Fix crash when drag & dropping images into ecode.

Fix Windows temp path resolution.
This commit is contained in:
Martín Lucas Golini
2026-01-07 16:25:17 -03:00
parent 9fa7b2bb57
commit 93a8c6e4ab
2 changed files with 2 additions and 2 deletions

View File

@@ -2367,7 +2367,7 @@ void App::loadImageFromMedium( const std::string& path, bool isMemory, bool forc
tab->setTooltipText( path );
auto icon = findIcon( "filetype-" + ext );
tab->setIcon( icon ? icon : findIcon( "file" ) );
if ( mConfig.editor.syncProjectTreeWithEditor ) {
if ( mProjectTreeView && mConfig.editor.syncProjectTreeWithEditor ) {
mProjectTreeView->setFocusOnSelection( false );
if ( !mCurrentProject.empty() && String::startsWith( path, mCurrentProject ) ) {
mProjectTreeView->openRowWithPath( path.substr( mCurrentProject.size() ) );