make sure we don't access an invalid config and crash
This commit is contained in:
parent
e1f17c63b6
commit
db5ef57480
@ -147,7 +147,11 @@ void AppletInterface::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Plasma::Package pkg = Plasma::PluginLoader::self()->loadPackage("Plasma/Generic");
|
Plasma::Package pkg = Plasma::PluginLoader::self()->loadPackage("Plasma/Generic");
|
||||||
pkg.setPath(defaults.readEntry("ToolBox", "org.kde.toolbox"));
|
if (defaults.isValid()) {
|
||||||
|
pkg.setPath(defaults.readEntry("ToolBox", "org.kde.toolbox"));
|
||||||
|
} else {
|
||||||
|
pkg.setPath("org.kde.toolbox");
|
||||||
|
}
|
||||||
|
|
||||||
if (pkg.isValid()) {
|
if (pkg.isValid()) {
|
||||||
QObject *toolBoxObject = m_qmlObject->createObjectFromSource(QUrl::fromLocalFile(pkg.filePath("mainscript")));
|
QObject *toolBoxObject = m_qmlObject->createObjectFromSource(QUrl::fromLocalFile(pkg.filePath("mainscript")));
|
||||||
|
Loading…
Reference in New Issue
Block a user