SVN commit 1074340 by gladhorn: don't crash when opening documents with < 2 identifiers Patch by: Aleks M +4 -0 kwordquiz.cpp --- trunk/KDE/kdeedu/kwordquiz/src/kwordquiz.cpp #1074339:1074340 @@ -585,6 +585,10 @@ if (!url.isEmpty() && KIO::NetAccess::exists(url, KIO::NetAccess::SourceSide, this)) { int result = m_doc->open(url); if (result == KEduVocDocument::NoError) { + while (m_doc->identifierCount() < 2) { //if we opened a TAB-less CSV, there + m_doc->appendIdentifier(); //may be 0 or 1 identifiers, we need at least 2 + } + m_tableModel->reset(); m_dirWatch->addFile(url.path()); setCaption(m_doc->url().fileName(), false);