diff options
author | Arno <am@disconnect.de> | 2011-12-28 19:50:07 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2011-12-28 19:50:07 +0100 |
commit | e3302975756e7c3eb5f48ee7ed3e550db6a99658 (patch) | |
tree | 6d21e60c7194546a64640ed17c723d988640bf4e /dbanalyzer.cpp | |
parent | de520355e8f37f5a70015e98a505ee25810b2620 (diff) | |
download | SheMov-e3302975756e7c3eb5f48ee7ed3e550db6a99658.tar.gz SheMov-e3302975756e7c3eb5f48ee7ed3e550db6a99658.tar.bz2 SheMov-e3302975756e7c3eb5f48ee7ed3e550db6a99658.zip |
Don't try to read first item in DbAnalyzerDialog when list is empty
Don't crash when data is empty in DbAnalyzerDialog::populate or the last
item was deleted.
Diffstat (limited to 'dbanalyzer.cpp')
-rw-r--r-- | dbanalyzer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dbanalyzer.cpp b/dbanalyzer.cpp index d121f6b..7243e68 100644 --- a/dbanalyzer.cpp +++ b/dbanalyzer.cpp @@ -284,6 +284,9 @@ void DbAnalyzerDialog::deleteMarks(){ } void DbAnalyzerDialog::populate(QTreeView *view, SmTreeModel *model, const QList<QList<QVariant> > &data, const QHash<int, QVariant> &marks){ + if(data.isEmpty()){ + return; + } const int columns = data.first().count(); if(columns == 0){ return; |