Fix NPE for server relaunch
This commit is contained in:
parent
ff18294591
commit
d663884aa5
1 changed files with 10 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue