mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Проверки на null для "защиты от дурака"
This commit is contained in:
parent
1b12dd895a
commit
45666e6090
1 changed files with 2 additions and 0 deletions
|
@ -106,6 +106,7 @@ public static void main(String[] args) throws Throwable {
|
|||
}
|
||||
Class<?> mainClass;
|
||||
if (config.customClassPath) {
|
||||
if(config.classpath == null) throw new UnsupportedOperationException("classpath is null, customClassPath not available");
|
||||
String[] cp = config.classpath.split(":");
|
||||
if (!ServerAgent.isAgentStarted()) {
|
||||
LogHelper.warning("JavaAgent not found. Using URLClassLoader");
|
||||
|
@ -123,6 +124,7 @@ public static void main(String[] args) throws Throwable {
|
|||
if (!ServerAgent.isAgentStarted()) {
|
||||
throw new UnsupportedOperationException("JavaAgent not found, autoloadLibraries not available");
|
||||
}
|
||||
if(config.librariesDir == null) throw new UnsupportedOperationException("librariesDir is null, autoloadLibraries not available");
|
||||
Path librariesDir = Paths.get(config.librariesDir);
|
||||
LogHelper.info("Load libraries");
|
||||
ServerAgent.loadLibraries(librariesDir);
|
||||
|
|
Loading…
Reference in a new issue