The reason why I check in a wrong function in rev 9382 is that originally I have code like:
cbStyledTextCtrl* EditorTweaks::GetSafeControl()
{
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (!ed || m_isUpdatingUI)
return nullptr;
return ed->GetControl();
}
After the testing by dmoore, I quickly blindly remove the m_isUpdatingUI check, thus error happens:
cbStyledTextCtrl* EditorTweaks::GetSafeControl()
{
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (!ed)
return ed->GetControl();
}