Don't close module if opening failed during graphics initialization

This commit is contained in:
Christoph Hohmann
2014-01-03 18:15:50 +01:00
parent 70e6e33abd
commit 1a928f638c

View File

@@ -159,7 +159,8 @@ void gs_destroy(graphics_t graphics)
pthread_mutex_destroy(&graphics->mutex);
da_free(graphics->matrix_stack);
da_free(graphics->viewport_stack);
os_dlclose(graphics->module);
if (graphics->module)
os_dlclose(graphics->module);
bfree(graphics);
}