From: David Capel Date: Thu, 14 Aug 2008 11:44:34 +0000 (+0000) Subject: Fixes a crash (when wordType() is null). X-Git-Tag: v4.1.80~23 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=3ed1aeb4791022149a01aa474f154fe0fe9acee7;p=libqmvoc.git Fixes a crash (when wordType() is null). svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=847006 --- diff --git a/keduvocdocument/keduvocwordtype.cpp b/keduvocdocument/keduvocwordtype.cpp index 853d226..65b0638 100644 --- a/keduvocdocument/keduvocwordtype.cpp +++ b/keduvocdocument/keduvocwordtype.cpp @@ -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; }