Skip to content

Commit

Permalink
Merge pull request ome#4090 from CGDogan/patch-5
Browse files Browse the repository at this point in the history
Throw error when cannot load library
  • Loading branch information
dgault authored Oct 6, 2023
2 parents f9f4617 + 39f944f commit 9595b6c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ public JPEGTurboServiceImpl() {
logger = Logger.getLogger(NATIVE_LIB_CLASS);
logger.setLevel(Level.SEVERE);
if (!libraryLoaded) {
NativeLibraryUtil.loadNativeLibrary(TJ.class, "turbojpeg");
libraryLoaded = true;
libraryLoaded = NativeLibraryUtil.loadNativeLibrary(TJ.class, "turbojpeg");
if (!libraryLoaded) {
throw new RuntimeException("TurboJPEG could not be loaded");
}
}
}

Expand Down

0 comments on commit 9595b6c

Please sign in to comment.