mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-03 06:28:48 +00:00
Add safe error catching
This commit is contained in:
1 parent
c9c7d9ab1b
commit
f1b43d69b6
1 file changed
+8
-1
@@ -1,5 +1,7 @@
|
|||||||
package com.moulberry.flashback.exporting.taskbar;
|
package com.moulberry.flashback.exporting.taskbar;
|
||||||
|
|
||||||
|
import com.moulberry.flashback.Flashback;
|
||||||
|
import com.replaymod.lib.com.googlecode.mp4parser.util.Logger;
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
import com.sun.jna.platform.win32.*;
|
import com.sun.jna.platform.win32.*;
|
||||||
import com.sun.jna.ptr.PointerByReference;
|
import com.sun.jna.ptr.PointerByReference;
|
||||||
@@ -11,7 +13,12 @@ import static com.moulberry.flashback.editor.ui.CustomImGuiImplGlfw.IS_WINDOWS;
|
|||||||
public class TaskbarHost {
|
public class TaskbarHost {
|
||||||
public static ITaskbar createTaskbar() {
|
public static ITaskbar createTaskbar() {
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
return createWindowsInterface();
|
try {
|
||||||
|
return createWindowsInterface();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Flashback.LOGGER.error("Unable to create windows taskbar interface", e);
|
||||||
|
return new NoopTaskbar();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return new NoopTaskbar();
|
return new NoopTaskbar();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user