diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-11 15:36:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-11 17:33:48 +0100 |
commit | 41df2c5c8b32c8d8ec38be8d087ef9dbc221cccb (patch) | |
tree | 056d7ff8a05250cc19358a6ec44bf405c5172084 /vcl | |
parent | 01c74f4319085a455898f01ce939a2679fdc9460 (diff) |
coverity#1242425 Dereference after null check
Change-Id: I638d1601ac6cb5e43ee60f60869f6128060e6d05
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/menu.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index cc34a1f595e8..c925e994ab6e 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2477,7 +2477,7 @@ vcl::Window* MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, Men pMenu->pStartedFrom = 0; pMenu->pWindow = pWindow; pMenuBarWindow->SetMenu(pMenu); - long nHeight = pMenu->ImplCalcSize(pWindow).Height(); + long nHeight = pWindow ? pMenu->ImplCalcSize(pWindow).Height() : 0; // depending on the native implementation or the displayable flag // the menubar windows is suppressed (ie, height=0) |