summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/DynamicLoader.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-05 13:12:21 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-05 13:12:21 (GMT)
commitf6749f727451ef3e35c20e80e712f0bda38348f9 (patch)
tree9b477e3599d7615c9c27dc43959e099a90e98f3c /Source/kwsys/DynamicLoader.cxx
parent9e3181a1128e7d4f830f56da397f0aaa04cb558d (diff)
parent0c34ac2f0159645f6a2cd0f57a45ffae36b4352d (diff)
downloadCMake-f6749f727451ef3e35c20e80e712f0bda38348f9.zip
CMake-f6749f727451ef3e35c20e80e712f0bda38348f9.tar.gz
CMake-f6749f727451ef3e35c20e80e712f0bda38348f9.tar.bz2
Merge branch 'upstream-kwsys' into update-kwsys
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);
}