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:
parent
3027731686
commit
fc0633fae3
1 changed files with 8 additions and 0 deletions
|
@ -137,6 +137,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr )
|
||||||
library = new KLibrary(path);
|
library = new KLibrary(path);
|
||||||
|
|
||||||
// If that fails, fall back to the default plugin
|
// If that fails, fall back to the default plugin
|
||||||
|
trydefaultlib:
|
||||||
if (!library)
|
if (!library)
|
||||||
{
|
{
|
||||||
kDebug(1212) << " could not load library, try default plugin again";
|
kDebug(1212) << " could not load library, try default plugin again";
|
||||||
|
@ -162,6 +163,13 @@ bool KDecorationPlugins::loadPlugin( QString nameStr )
|
||||||
|
|
||||||
if(!create_ptr)
|
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 ));
|
error( i18n( "The library %1 is not a KWin plugin.", path ));
|
||||||
library->unload();
|
library->unload();
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue