diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index 89218312a2..694c1c2b07 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -184,7 +184,8 @@ void LoaderUnload(const char *name, void *handle) { xf86Msg(X_INFO, "Unloading %s\n", name); - dlclose(handle); + if (handle) + dlclose(handle); } unsigned long LoaderOptions = 0;