Prevent crash when focusing button.

This commit is contained in:
Sanel Zukan 2018-05-04 00:52:05 +02:00
parent cbcb0e2ce4
commit 5489ef0b70
1 changed files with 2 additions and 3 deletions

View File

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