mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
9939 Temporary fix for crash situation
Crash is seen on application exit
This commit is contained in:
parent
26c8883761
commit
f2fa0ad024
@ -492,11 +492,25 @@ void caf::PdmUiFormLayoutObjectEditor::cleanupBeforeSettingPdmObject()
|
||||
|
||||
m_groupBoxes.clear();
|
||||
|
||||
for ( auto l : m_layouts )
|
||||
{
|
||||
delete l;
|
||||
l = nullptr;
|
||||
}
|
||||
// https://github.com/OPM/ResInsight/issues/9939
|
||||
//
|
||||
// The following lines causes crash. m_layouts contains pointers to layouts that are invalid at this point. The
|
||||
// m_layouts are created for widgets where the labels are located on top of the widget, and this option is rarely
|
||||
// used. The crash happens on exit every time when a layout has been created.
|
||||
//
|
||||
// A crash has also happened during runtime, but is hard to reproduce.
|
||||
//
|
||||
// NB! There will be memory leak at this point, but the workaround allowing memory leak is considered OK on short
|
||||
// term. Investigate and find a correct solution
|
||||
//
|
||||
/*
|
||||
for ( auto l : m_layouts )
|
||||
{
|
||||
delete l;
|
||||
l = nullptr;
|
||||
}
|
||||
*/
|
||||
|
||||
m_layouts.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user