File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
src/observers/export.vars.files.csv-multicols/src Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ SET(OFBUILD_CUSTOM_CMAKE_VERSION "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.
2323SET (OPENFLUID_VERSION_MAJOR 2)
2424SET (OPENFLUID_VERSION_MINOR 2)
2525SET (OPENFLUID_VERSION_PATCH 1)
26- SET (OPENFLUID_VERSION_STATUS "alpha3 " ) # example: SET(OPENFLUID_VERSION_STATUS "rc1")
26+ SET (OPENFLUID_VERSION_STATUS "alpha4 " ) # example: SET(OPENFLUID_VERSION_STATUS "rc1")
2727
2828SET (OPENFLUID_VERSION_FULL "${OPENFLUID_VERSION_MAJOR} .${OPENFLUID_VERSION_MINOR} .${OPENFLUID_VERSION_PATCH} " )
2929
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ class CSVMultiColFilesObserver : public CSVFilesObserverBase
8585
8686 bool m_KeepNA;
8787
88+ bool m_FilesInitialized = false ;
89+
8890
8991 public:
9092
@@ -288,7 +290,8 @@ class CSVMultiColFilesObserver : public CSVFilesObserverBase
288290 SetFiles.second .File = new BaseCSVFile ();
289291 SetFiles.second .ColumnsHeaders = ColumnsHeaders;
290292 }
291-
293+
294+ m_FilesInitialized = true ;
292295
293296 for (auto & SetFiles : m_SetsFiles)
294297 {
@@ -368,12 +371,15 @@ class CSVMultiColFilesObserver : public CSVFilesObserverBase
368371
369372 void onFinalizedRun ()
370373 {
371- for ( auto & SetFiles : m_SetsFiles )
374+ if (m_FilesInitialized )
372375 {
373- if ( SetFiles. second . File )
376+ for ( auto & SetFiles : m_SetsFiles )
374377 {
375- delete SetFiles.second .File ;
376- SetFiles.second .File = 0 ; // avoid double delete issues
378+ if (SetFiles.second .File )
379+ {
380+ delete SetFiles.second .File ;
381+ SetFiles.second .File = 0 ; // avoid double delete issues
382+ }
377383 }
378384 }
379385 }
You can’t perform that action at this time.
0 commit comments