summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/DynamicLoader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/DynamicLoader.cxx')
-rw-r--r--Source/kwsys/DynamicLoader.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/kwsys/DynamicLoader.cxx b/Source/kwsys/DynamicLoader.cxx
index 66c7d57..a776f97 100644
--- a/Source/kwsys/DynamicLoader.cxx
+++ b/Source/kwsys/DynamicLoader.cxx
@@ -48,6 +48,10 @@ DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const kwsys_stl::string&
//----------------------------------------------------------------------------
int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
{
+ if (!lib)
+ {
+ return 0;
+ }
return !shl_unload(lib);
}