mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Fix NPE, better exception handling on startup
This commit is contained in:
@@ -19,10 +19,19 @@ public class Main {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
VRServer vrServer = new VRServer();
|
||||
vrServer.start();
|
||||
|
||||
new VRServerGUI(vrServer);
|
||||
try {
|
||||
VRServer vrServer = new VRServer();
|
||||
vrServer.start();
|
||||
new VRServerGUI(vrServer);
|
||||
} catch(Throwable e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
Thread.sleep(2000L);
|
||||
} catch(InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public enum TrackerBodyPosition {
|
||||
}
|
||||
|
||||
public static TrackerBodyPosition getByDesignation(String designation) {
|
||||
return byDesignation.get(designation.toLowerCase());
|
||||
return designation == null ? null : byDesignation.get(designation.toLowerCase());
|
||||
}
|
||||
|
||||
static {
|
||||
|
||||
Reference in New Issue
Block a user