From ee2c7251d0069de6fe5e20f9295ddc0cfd41fb5c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 14 Feb 2001 23:45:56 +0000 Subject: * dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when the library is not found --- winsup/cygwin/dlfcn.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/dlfcn.cc') diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc index a85351323..73c44f12d 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) -- cgit v1.2.3