From 485b8e25aa4b4f5c4d8dd47b17107fd435db090f Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sat, 6 Aug 2016 22:46:37 +0200 Subject: [PATCH] Fix: Dereference of null pointer in FMenu --- src/fmenu.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/fmenu.cpp b/src/fmenu.cpp index 29214b44..d5e22f73 100644 --- a/src/fmenu.cpp +++ b/src/fmenu.cpp @@ -612,11 +612,17 @@ void FMenu::draw() if ( (flags & fc::shadow) != 0 ) { + term_area* area = 0; + FWindow* area_widget = getWindowWidget(this); drawMenuShadow(); - term_area* area = getWindowWidget(this)->getVWin(); - if ( area ) - putArea (xpos+xmin-1, ypos+ymin-1, area); + if ( area_widget ) + { + area = area_widget->getVWin(); + + if ( area ) + putArea (xpos+xmin-1, ypos+ymin-1, area); + } } else updateVTerm(true);