Fix NPE for server relaunch

This commit is contained in:
Christian 2012-08-11 12:05:13 -04:00
parent ff18294591
commit d663884aa5

View file

@ -63,13 +63,16 @@ public class FMLRelauncher
classLoader = new RelaunchClassLoader(ucl.getURLs());
}
private void showWindow()
private void showWindow(boolean showIt)
{
try
{
RelaunchLibraryManager.downloadMonitor = new Downloader();
if (showIt)
{
popupWindow = RelaunchLibraryManager.downloadMonitor.makeDialog();
}
}
catch (Exception e)
{
Downloader.makeHeadless();
@ -79,7 +82,7 @@ public class FMLRelauncher
private void relaunchClient(ArgsWrapper wrap)
{
showWindow();
showWindow(true);
// Now we re-inject the home into the "new" minecraft under our control
Class<? super Object> client;
try
@ -112,6 +115,7 @@ public class FMLRelauncher
private void relaunchServer(ArgsWrapper wrap)
{
showWindow(false);
// Now we re-inject the home into the "new" minecraft under our control
Class<? super Object> server;
File minecraftHome = new File(".");
@ -125,7 +129,6 @@ public class FMLRelauncher
catch (Exception e)
{
e.printStackTrace();
// Hmmm
}
}