If the loaded decoration library isn't a valid decoration load the

default decoration instead of dying.
CCBUG: 224440

svn path=/trunk/KDE/kdebase/workspace/; revision=1081285
This commit is contained in:
Lucas Murray 2010-01-28 04:11:13 +00:00
parent 3027731686
commit fc0633fae3

View file

@ -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;