summaryrefslogtreecommitdiff
path: root/src/Fl_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-03-27 11:32:23 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-03-27 11:32:23 +0100
commita6ea84487977dec4c291d92220a87756e9a1675f (patch)
treee9433741ffe6f9ef4e0613584a1089c503c99f3f /src/Fl_Screen_Driver.cxx
parent9a9b02f9dd6fd56c6ca5610c3414964423b3c863 (diff)
Check against null pointer for security
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
-rw-r--r--src/Fl_Screen_Driver.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index c5a118e30..43dbc144d 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -383,7 +383,7 @@ 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->top_window()->user_data() == &transient_scale_display) {
+ if (data->widget && data->widget->top_window()->user_data() == &transient_scale_display) {
data->widget = 0;
}
win->show();