diff --git a/src/eepp/system/sys.cpp b/src/eepp/system/sys.cpp index bca593b6c..30a49057e 100644 --- a/src/eepp/system/sys.cpp +++ b/src/eepp/system/sys.cpp @@ -841,7 +841,7 @@ std::string Sys::getTempPath() { #if EE_PLATFORM == EE_PLATFORM_WIN DWORD dwRetVal = GetTempPathA( EE_MAX_CFG_PATH_LEN, path ); - if ( 0 <= dwRetVal || dwRetVal > EE_MAX_CFG_PATH_LEN ) { + if ( dwRetVal == 0 || dwRetVal > EE_MAX_CFG_PATH_LEN ) { return std::string( "C:\\WINDOWS\\TEMP\\" ); } #elif EE_PLATFORM == EE_PLATFORM_ANDROID diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index b89651e15..7c693924e 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -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() ) );