diff --git a/toonz/sources/toonz/dvdirtreeview.cpp b/toonz/sources/toonz/dvdirtreeview.cpp index b76b752..71f739d 100644 --- a/toonz/sources/toonz/dvdirtreeview.cpp +++ b/toonz/sources/toonz/dvdirtreeview.cpp @@ -1631,7 +1631,7 @@ void DvDirTreeView::getExpandedPathsRecursive(const QModelIndex &index, void DvDirTreeView::onExpanded(const QModelIndex &index) { QStringList paths; getExpandedPathsRecursive(index, paths); - paths.removeFirst(); + if (paths.size()) paths.removeFirst(); MyFileSystemWatcher::instance()->addPaths(paths); }