[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Oct 27 19:40:17 CEST 2004


CVS commit by staikos: 

hopefully avoid possible corner-case crashes with localdata


  M +3 -3      kstplugin.cpp   1.75


--- kdeextragear-2/kst/kst/kstplugin.cpp  #1.74:1.75
@@ -137,5 +137,5 @@ void KstPlugin::commonConstructor() {
 KstPlugin::~KstPlugin() {
   if (_localData) {
-    if (!_plugin->freeLocalData(&_localData)) {
+    if (!_plugin || !_plugin->freeLocalData(&_localData)) {
       free(_localData);
     }
@@ -403,6 +403,6 @@ bool KstPlugin::setPlugin(KstSharedPtr<P
   }
 
-  if (_plugin && _localData) {
-    if (!_plugin->freeLocalData(&_localData)) {
+  if (_localData) {
+    if (!_plugin || !_plugin->freeLocalData(&_localData)) {
       free(_localData);
     }





More information about the Kst mailing list