Merge branch 'master' into qmake
[mdictionary] / src / mdictionary / backbone / backbone.cpp
index 4bbbd78..16bb487 100644 (file)
@@ -263,7 +263,10 @@ void Backbone::addDictionary(CommonDictInterface *dict, bool active) {
 
  void Backbone::removeDictionary(CommonDictInterface *dict) {
      _dicts.remove(dict);
-     dict->clean();
+     if(dict)
+        dict->clean();
+     else
+        qDebug()<<"delete empty dict";
      delete dict;
      dictUpdated();
 
@@ -453,6 +456,7 @@ void Backbone::loadDicts(QString fileName) {
 
         set.endGroup();
         addInternalDictionary(plug->getNew(plugSet), active);
+        delete plugSet;
     }
 }