summaryrefslogtreecommitdiff
path: root/source/sys_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/sys_unix.c')
-rw-r--r--source/sys_unix.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/sys_unix.c b/source/sys_unix.c
index 96de99e..0368a77 100644
--- a/source/sys_unix.c
+++ b/source/sys_unix.c
@@ -800,11 +800,15 @@ void *Sys_LoadLibrary( const char *path, const char *sym, void **handle ) {
return NULL;
}
- entry = dlsym( module, sym );
- if( !entry ) {
- Com_DPrintf( "%s failed: %s\n", __func__, dlerror() );
- dlclose( module );
- return NULL;
+ if( sym ) {
+ entry = dlsym( module, sym );
+ if( !entry ) {
+ Com_DPrintf( "%s failed: %s\n", __func__, dlerror() );
+ dlclose( module );
+ return NULL;
+ }
+ } else {
+ entry = NULL;
}
Com_DPrintf( "%s succeeded: %s\n", __func__, path );