From: Jeremy Paul Whiting Date: Tue, 21 Aug 2007 19:08:37 +0000 (+0000) Subject: dont try to add an entry to a missing lesson X-Git-Tag: v3.93.0~68 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=635f22c4f7a7ece0205177af07b9028bedbc69aa;p=libqmvoc.git dont try to add an entry to a missing lesson svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=703015 --- diff --git a/keduvocdocument/keduvockvtmlreader.cpp b/keduvocdocument/keduvockvtmlreader.cpp index 1651907..ecd6594 100644 --- a/keduvocdocument/keduvockvtmlreader.cpp +++ b/keduvocdocument/keduvockvtmlreader.cpp @@ -1273,7 +1273,10 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent) m_doc->appendEntry(&expr); // also add this entryid to the lesson it's part of - m_doc->lesson(lesson)->addEntry(m_doc->entryCount()); + if (m_doc->lesson(lesson) != NULL) + { + m_doc->lesson(lesson)->addEntry(m_doc->entryCount()); + } return true; }