aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/dlfcn.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-02-14 23:45:56 +0000
committerChristopher Faylor <me@cgf.cx>2001-02-14 23:45:56 +0000
commitee2c7251d0069de6fe5e20f9295ddc0cfd41fb5c (patch)
treea8444718cfda028aaa405a439ceaf4096e1f80e3 /winsup/cygwin/dlfcn.cc
parent8f8e7442bb5afe429f6bdf1316ea7527b6a62e54 (diff)
downloadnewlib-ee2c7251d0069de6fe5e20f9295ddc0cfd41fb5c.zip
newlib-ee2c7251d0069de6fe5e20f9295ddc0cfd41fb5c.tar.gz
newlib-ee2c7251d0069de6fe5e20f9295ddc0cfd41fb5c.tar.bz2
* dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when the
library is not found
Diffstat (limited to 'winsup/cygwin/dlfcn.cc')
-rw-r--r--winsup/cygwin/dlfcn.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
index a853513..73c44f1 100644
--- a/winsup/cygwin/dlfcn.cc
+++ b/winsup/cygwin/dlfcn.cc
@@ -177,7 +177,8 @@ dlopen (const char *name, int)
{
/* handle for the named library */
const char *fullpath = get_full_path_of_dll (name);
- ret = (void *) LoadLibrary (fullpath);
+ if (fullpath)
+ ret = (void *) LoadLibrary (fullpath);
}
if (!ret)