]> Git trees. - libqmvoc.git/commitdiff
dont try to add an entry to a missing lesson
authorJeremy Paul Whiting <jpwhiting@kde.org>
Tue, 21 Aug 2007 19:08:37 +0000 (19:08 +0000)
committerJeremy Paul Whiting <jpwhiting@kde.org>
Tue, 21 Aug 2007 19:08:37 +0000 (19:08 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=703015

keduvocdocument/keduvockvtmlreader.cpp

index 1651907604575e540c41fafe43d0040678b374b7..ecd65947e1d14f09e16b56f4b7d504edb10ac81e 100644 (file)
@@ -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;
 }