Prevent crash when focusing button.

This commit is contained in:
Sanel Zukan 2018-05-04 00:52:05 +02:00
parent cbcb0e2ce4
commit 5489ef0b70

View File

@ -215,12 +215,11 @@ int main(int argc, char **argv) {
Fl_Button* close_button = new Fl_Button(435, 224, 90, 25, _("&Close")); Fl_Button* close_button = new Fl_Button(435, 224, 90, 25, _("&Close"));
close_button->callback(close_cb); close_button->callback(close_cb);
// check_button somehow steal focus
close_button->take_focus();
win->end(); win->end();
window_center_on_screen(win); window_center_on_screen(win);
win->show(argc, argv); win->show(argc, argv);
// check_button somehow steal focus
close_button->take_focus();
Fl::run(); Fl::run();