Fix crash when starting editor introduced in 8816dc9cd9

This commit is contained in:
Charles Dang 2016-08-22 14:58:24 +11:00
parent 8816dc9cd9
commit 0a0caf9104

View file

@ -2675,13 +2675,13 @@ void display::redraw_everything()
create_buttons();
}
hotkey::command_executor* command_executor =
resources::controller->get_hotkey_command_executor();
if (command_executor != nullptr)
{
// This function adds button overlays,
// it needs to be run after recreating the buttons.
command_executor->set_button_state();
if(resources::controller) {
hotkey::command_executor* command_executor = resources::controller->get_hotkey_command_executor();
if(command_executor != nullptr) {
// This function adds button overlays,
// it needs to be run after recreating the buttons.
command_executor->set_button_state();
}
}
panelsDrawn_ = false;