More info:
1 - the crash happens before the destructor - wxSplitPanel::~wxSplitPanel() is called
this (original code) crashes:
m_splitter->SetSashPosition(ConfigManager::Get()->Read(m_SplitterConfig, (long int)150));
this does not:
ConfigManager::Get()->Read(m_SplitterConfig, (long int)150);
this does:
if (m_splitter)
m_splitter->SetSashPosition((long int)307); // hard code value
so it can read the config registry key fine (editor/opened_files_tree_height = 307), but setting the sashposition crashes (even though the wxSplitter is not null).
wxSplitterWindow::SetSashPosition
void SetSashPosition(int position, const bool redraw = TRUE)
Sets the sash position.
Parameters
position
The sash position in pixels.
redraw
If TRUE, resizes the panes and redraws the sash and border.
Remarks
Does not currently check for an out-of-range value.
still debugging, but I don't see why it sets the sash position on openfiletree() refresh from the registry on _every_ refresh?
shouldn't this be changed when it is created (splithorizontally(width, height, sashposfromregistry))?