diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx index 43dbc144d..c3f62c03e 100644 --- a/src/Fl_Screen_Driver.cxx +++ b/src/Fl_Screen_Driver.cxx @@ -383,8 +383,11 @@ void Fl_Screen_Driver::transient_scale_display(float f, int nscreen) win_and_widget *data = new win_and_widget; data->win = win; data->widget = Fl::focus(); - if (data->widget && data->widget->top_window()->user_data() == &transient_scale_display) { - data->widget = 0; + if (data->widget) { + Fl_Window *top = data->widget->top_window(); + if (!top || top->user_data() == &transient_scale_display) { + data->widget = 0; + } } win->show(); Fl::add_timeout(1, (Fl_Timeout_Handler)del_transient_window, data); // delete after 1 sec