diff --git a/EXE_GeomDB.cpp b/EXE_GeomDB.cpp index 9f44a7b..678598b 100644 --- a/EXE_GeomDB.cpp +++ b/EXE_GeomDB.cpp @@ -267,8 +267,9 @@ ExeNewFile( void) bool bPrevCmdLog = SetCmdLog( false) ; ExeResetCurrPartLayer() ; SetCmdLog( bPrevCmdLog) ; - // aggiornamento gestore lavorazioni - ExeUpdateMachMgr() ; + // aggiornamento gestore lavorazioni (se installato) + if ( GetCurrMachMgr() != nullptr) + ExeUpdateMachMgr() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { string sLua = "EgtNewFile()" @@ -293,7 +294,8 @@ ExeOpenFile( const string& sFilePath) if ( pGseCtx->m_pScene != nullptr) bOk = bOk && pGseCtx->m_pScene->UnloadAllTextures() ; // pulizia gestore lavorazioni (necessaria qui) - ExeUpdateMachMgr() ; + if ( GetCurrMachMgr() != nullptr) + ExeUpdateMachMgr() ; // imposto path corrente del file pGseCtx->m_sFilePath = sFilePath ; // carico il file @@ -305,7 +307,8 @@ ExeOpenFile( const string& sFilePath) ExeResetCurrPartLayer() ; SetCmdLog( bPrevCmdLog) ; // aggiornamento gestore lavorazioni - ExeUpdateMachMgr() ; + if ( GetCurrMachMgr() != nullptr) + ExeUpdateMachMgr() ; // se richiesto, salvo il comando Lua equivalente if ( IsCmdLog()) { string sLua = "EgtOpenFile('" + StringToLuaString( sFilePath) + "')" +