diff options
author | Sven Gothel <[email protected]> | 2019-06-21 18:48:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-06-21 18:48:37 +0200 |
commit | e44b9364353a6173598eb98d276795d77cc4456c (patch) | |
tree | 6fec026bef8865fe49d7e9bce7fbecc59d824cb0 /src/java/jogamp/common/os/DynamicLinkerImpl.java | |
parent | 8ce56955f989f0d8ac21335ea563f9c7eb111154 (diff) |
iOS: NativeLibrary: Refine iOS, use proper alt system path for iOS+OSX, relax closeLibrary(..)
Diffstat (limited to 'src/java/jogamp/common/os/DynamicLinkerImpl.java')
-rw-r--r-- | src/java/jogamp/common/os/DynamicLinkerImpl.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/java/jogamp/common/os/DynamicLinkerImpl.java b/src/java/jogamp/common/os/DynamicLinkerImpl.java index 56a909e..5ce94c1 100644 --- a/src/java/jogamp/common/os/DynamicLinkerImpl.java +++ b/src/java/jogamp/common/os/DynamicLinkerImpl.java @@ -144,14 +144,15 @@ import com.jogamp.common.util.SecurityUtil; @Override public final void closeLibrary(final long libraryHandle, final boolean debug) throws SecurityException, IllegalArgumentException { final LibRef libRef = decrLibRefCount( libraryHandle ); - if( null == libRef ) { - throw new IllegalArgumentException("Library handle 0x"+Long.toHexString(libraryHandle)+" unknown."); - } - checkLinkPermission(libRef.getName()); + if( null != libRef ) { + checkLinkPermission(libRef.getName()); + } // else null libRef is OK for global lookup if( DEBUG || debug ) { System.err.println("DynamicLinkerImpl.closeLibrary(0x"+Long.toHexString(libraryHandle)+" -> "+libRef+")"); } - closeLibraryImpl(libraryHandle); + if( 0 != libraryHandle ) { + closeLibraryImpl(libraryHandle); + } } protected abstract void closeLibraryImpl(final long libraryHandle) throws SecurityException; |