From 069cffb7b9e566b06b2053fa5ab2c55f06f683fb Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 3 Oct 2012 23:33:17 +0200 Subject: [PATCH] Fix broken build on Win32. --- dynamic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dynamic.c b/dynamic.c index 97c55bc342..c86638e07a 100644 --- a/dynamic.c +++ b/dynamic.c @@ -98,7 +98,6 @@ static void load_symbols(void) if (!lib_handle) { RARCH_ERR("Failed to open dynamic library: \"%s\"\n", g_settings.libretro); - RARCH_ERR("%s\n", dlerror()); rarch_fail(1, "load_dynamic()"); } #endif @@ -187,7 +186,10 @@ dylib_t dylib_load(const char *path) RARCH_ERR("Failed to load library, error code: 0x%x\n", (unsigned)GetLastError()); return lib; #else - return dlopen(path, RTLD_LAZY); + dylib_t lib = dlopen(path, RTLD_LAZY); + if (!lib) + RARCH_ERR("dylib_load() failed: \"%s\".\n", dlerror()); + return lib; #endif }