]> Git trees. - libqmvoc.git/commitdiff
Fixes a crash (when wordType() is null).
authorDavid Capel <wot.narg@gmail.com>
Thu, 14 Aug 2008 11:44:34 +0000 (11:44 +0000)
committerDavid Capel <wot.narg@gmail.com>
Thu, 14 Aug 2008 11:44:34 +0000 (11:44 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=847006

keduvocdocument/keduvocwordtype.cpp

index 853d2269d54033a8a04c74eda470afbd86575374..65b06386c3f30a66d5be896bf0b5c44e56fc4710 100644 (file)
@@ -94,7 +94,7 @@ void KEduVocWordType::removeTranslation(KEduVocTranslation* translation)
     // remove from cache
     bool found = false;
     foreach(int i, translation->entry()->translationIndices()) {
-        if (translation->entry()->translation(i)->wordType() == this) {
+        if (translation->entry()->translation(i)->wordType() && translation->entry()->translation(i)->wordType() == this) {
             found = true;
             break;
         }