diff --git a/lib/kdecoration_plugins_p.cpp b/lib/kdecoration_plugins_p.cpp index bd4a9db0de..b5d618d2a3 100644 --- a/lib/kdecoration_plugins_p.cpp +++ b/lib/kdecoration_plugins_p.cpp @@ -137,6 +137,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) library = new KLibrary(path); // If that fails, fall back to the default plugin +trydefaultlib: if (!library) { kDebug(1212) << " could not load library, try default plugin again"; @@ -162,6 +163,13 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) if(!create_ptr) { + if( nameStr != defaultPlugin ) + { + kDebug(1212) << i18n( "The library %1 is not a KWin plugin.", path ); + library->unload(); + library = NULL; + goto trydefaultlib; + } error( i18n( "The library %1 is not a KWin plugin.", path )); library->unload(); return false;