Permalink
Browse files

check for valid model index

  • Loading branch information...
xiaoqiangwang committed Jan 8, 2018
1 parent 958695d commit 7e8c5c44f670f6910fe3fca1a1dc657835758318
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/imagelistviewer.cpp
View
@@ -126,6 +126,8 @@ void ImageListViewer::imageChanged(const QString &filename)
void ImageListViewer::viewImage(const QModelIndex &index)
{
if (!index.isValid())
return;
QString filename = qvariant_cast<QString>(index.model()->data(index));
emit selectedFileChanged(filename);
}

0 comments on commit 7e8c5c4

Please sign in to comment.