summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2006-10-06 23:36:22 +0000
committerwtchang%redhat.com <devnull@localhost>2006-10-06 23:36:22 +0000
commit248d7f5b8a225e62a85f84a51b622349797f07b5 (patch)
tree0200a1fc18449c2e711b384bcc23554234f9af94
parent8c5af38b2852fc7db83ea430c4e52b6d6dee487d (diff)
downloadnspr-hg-248d7f5b8a225e62a85f84a51b622349797f07b5.tar.gz
Bugzilla Bug 351609: test lib->dlh before calling NSUnLinkModule on Mac.
r=Mark Mentovai Tag: NSPR_4_6_BRANCH
-rw-r--r--pr/src/linking/prlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c
index 7fb06b78..5f83f257 100644
--- a/pr/src/linking/prlink.c
+++ b/pr/src/linking/prlink.c
@@ -1267,7 +1267,8 @@ PR_UnloadLibrary(PRLibrary *lib)
#elif defined(USE_HPSHL)
result = shl_unload(lib->dlh);
#elif defined(USE_MACH_DYLD)
- result = NSUnLinkModule(lib->dlh, NSUNLINKMODULE_OPTION_NONE) ? 0 : -1;
+ if (lib->dlh)
+ result = NSUnLinkModule(lib->dlh, NSUNLINKMODULE_OPTION_NONE) ? 0 : -1;
#else
#error Configuration error
#endif