diff options
-rw-r--r-- | smdirmodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/smdirmodel.cpp b/smdirmodel.cpp index 6053890..1a631ba 100644 --- a/smdirmodel.cpp +++ b/smdirmodel.cpp @@ -158,6 +158,9 @@ void SmDirModel::dirEvent(const QList<QVariant> &data, int e){ addFile(data); } QModelIndex idx = find(data.at(Name), Name, rootIndex()); + if(!idx.isValid()){ + return; + } if(e == SmDirWatcher::Deleted){ removeRow(idx.row()); } |