summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-07-05 18:58:33 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-07-05 19:12:06 +0200
commit31eb731cab2c6a582a42d35f90ca23f676e313e5 (patch)
tree8a1cefb88a5b8aa67ccbf8891e7ea08c7f9ad600
parentc7b1182591c76a560666dca0470468b827e5c77d (diff)
downloadkbfx-31eb731cab2c6a582a42d35f90ca23f676e313e5.tar.gz
kbfx-31eb731cab2c6a582a42d35f90ca23f676e313e5.zip
Fix potential crash if no any plugins present
Thanks to Roman Savochenko for the patch!
-rw-r--r--kbfxlib/data/kbfxplasmapluginloader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kbfxlib/data/kbfxplasmapluginloader.cpp b/kbfxlib/data/kbfxplasmapluginloader.cpp
index ed2c458..0258ca7 100644
--- a/kbfxlib/data/kbfxplasmapluginloader.cpp
+++ b/kbfxlib/data/kbfxplasmapluginloader.cpp
@@ -103,7 +103,7 @@ KbfxPlasmaPluginLoader::getView ( TQString name )
pluginMap().remove ( it );
}
init();
- KbfxDataStack * stack = pluginMap() [name]->data();
+ KbfxDataStack * stack = pluginMap() [name] ? pluginMap() [name]->data() : NULL;
if (stack == 0 ) {
return new KbfxDataStack();