Merge pull request #2899 from open-osrs/work-the-first-build
client: fix npe during first build
This commit is contained in:
@@ -140,7 +140,7 @@ public class ClientLoader implements Supplier<Applet>
|
|||||||
// in the jar. Otherwise the jar can change on disk and can break future classloads.
|
// in the jar. Otherwise the jar can change on disk and can break future classloads.
|
||||||
File oprsInjected = new File(System.getProperty("user.home") + "/.openosrs/cache/injected-client.jar");
|
File oprsInjected = new File(System.getProperty("user.home") + "/.openosrs/cache/injected-client.jar");
|
||||||
InputStream initialStream = RuneLite.class.getResourceAsStream("injected-client.oprs");
|
InputStream initialStream = RuneLite.class.getResourceAsStream("injected-client.oprs");
|
||||||
if (oprsInjected.length() != RuneLite.class.getResource("injected-client.oprs").getFile().length())
|
if (!oprsInjected.exists() || oprsInjected.length() != RuneLite.class.getResource("injected-client.oprs").getFile().length())
|
||||||
FileUtils.copyInputStreamToFile(initialStream, oprsInjected);
|
FileUtils.copyInputStreamToFile(initialStream, oprsInjected);
|
||||||
|
|
||||||
classLoader = createJarClassLoader(oprsInjected);
|
classLoader = createJarClassLoader(oprsInjected);
|
||||||
|
|||||||
Reference in New Issue
Block a user