mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-09 16:25:10 +03:00
Window decorations: do not exit application with UnsatisfiedLinkError in case that FlatLaf DLL cannot be executed because of restrictions on temporary directory (issue #436)
This commit is contained in:
@@ -163,11 +163,18 @@ class FlatWindowsNativeWindowBorder
|
||||
return;
|
||||
|
||||
// install
|
||||
WndProc wndProc = new WndProc( window );
|
||||
if( wndProc.hwnd == 0 )
|
||||
return;
|
||||
try {
|
||||
WndProc wndProc = new WndProc( window );
|
||||
if( wndProc.hwnd == 0 )
|
||||
return;
|
||||
|
||||
windowsMap.put( window, wndProc );
|
||||
windowsMap.put( window, wndProc );
|
||||
} catch( UnsatisfiedLinkError ex ) {
|
||||
// catch for the case that the operating system prevents execution of DLL
|
||||
// (e.g. if DLLs in temp folder are restricted)
|
||||
// --> continue application without custom decorations
|
||||
LoggingFacade.INSTANCE.logSevere( null, ex );
|
||||
}
|
||||
}
|
||||
|
||||
private void uninstall( Window window ) {
|
||||
|
||||
Reference in New Issue
Block a user