mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Когда по ошибке в папке модулей оказывается библиотека, не засыпаем консоль NPE.
This commit is contained in:
parent
9456c45a3d
commit
fe0b4ccf04
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ public LauncherModule loadModule(LauncherModule module) {
|
||||||
@Override
|
@Override
|
||||||
public LauncherModule loadModule(Path file) throws IOException {
|
public LauncherModule loadModule(Path file) throws IOException {
|
||||||
try (JarFile f = new JarFile(file.toFile())) {
|
try (JarFile f = new JarFile(file.toFile())) {
|
||||||
String moduleClass = f.getManifest().getMainAttributes().getValue("Module-Main-Class");
|
String moduleClass = f.getManifest() != null ? f.getManifest().getMainAttributes().getValue("Module-Main-Class") : null;
|
||||||
if (moduleClass == null) {
|
if (moduleClass == null) {
|
||||||
LogHelper.error("In module %s Module-Main-Class not found", file.toString());
|
LogHelper.error("In module %s Module-Main-Class not found", file.toString());
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue