# HG changeset patch # User Daniel Atallah # Date 1135267601 0 # Node ID 70f18c73da9d9291f0f0e46d8fc3870e36845f22 # Parent b7860c9902f2b37208ac61745880d3a538da67ec [gaim-migrate @ 14959] Prevent error popups from appearing when plugin DLLs can't be loaded by Windows LoadLibrary(). The messages still appear in the debug log. committer: Tailor Script diff -r b7860c9902f2 -r 70f18c73da9d src/plugin.c --- a/src/plugin.c Thu Dec 22 14:58:45 2005 +0000 +++ b/src/plugin.c Thu Dec 22 16:06:41 2005 +0000 @@ -226,6 +226,10 @@ if (plugin->native_plugin) { const char *error; +#ifdef _WIN32 + /* Suppress error popups for failing to load plugins */ + UINT old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS); +#endif /* * We pass G_MODULE_BIND_LOCAL here to prevent symbols from * plugins being added to the global name space. @@ -239,6 +243,11 @@ plugin->handle = g_module_open(filename, 0); #endif +#ifdef _WIN32 + /* Restore the original error mode */ + SetErrorMode(old_error_mode); +#endif + if (plugin->handle == NULL) { error = g_module_error();