From 14f0fd28bbeec42dfcebcebe59b858931eaeb881 Mon Sep 17 00:00:00 2001 From: Jeremy Bullock Date: May 24 2017 04:03:40 +0000 Subject: Merge pull request #1158 from lordadamson/loadSceneCrash fix #1156 which causes program to crash when expanding history --- 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); }