From 577f2e3dbb6e2824fc189a30d8438271ff8e4ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Tue, 1 Apr 2025 19:29:34 -0300 Subject: [PATCH] I think this prevents a potential crash. --- src/eepp/ui/models/filesystemmodel.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/eepp/ui/models/filesystemmodel.cpp b/src/eepp/ui/models/filesystemmodel.cpp index ac0921e0b..d90842fa9 100644 --- a/src/eepp/ui/models/filesystemmodel.cpp +++ b/src/eepp/ui/models/filesystemmodel.cpp @@ -26,11 +26,9 @@ FileSystemModel::Node::Node( const std::string& rootPath, FileSystemModel& model if ( threadPool ) { mQueuedForTraversal = true; threadPool->run( [this, &model]() { - auto rowCount = model.rowCount(); traverseIfNeeded( model ); model.refreshView(); - if ( rowCount != model.rowCount() ) - model.invalidate( Model::DontInvalidateIndexes ); + model.invalidate( Model::DontInvalidateIndexes ); } ); } else { traverseIfNeeded( model );