diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-02-01 17:36:16 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-02-01 17:38:59 +0100 |
commit | c161e3652853e7478f79df22e83412ada50f3c6a (patch) | |
tree | f36b792074a6ba7050f77e4403a868f19ebf2e9f /vcl | |
parent | VCL_DLLPUBLIC was missing for some *Value types (diff) | |
download | core-c161e3652853e7478f79df22e83412ada50f3c6a.tar.gz core-c161e3652853e7478f79df22e83412ada50f3c6a.zip |
add a check before a cast
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/kde4/KDESalGraphics.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index c552d91b2e9d..0be12fb37fcc 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -369,6 +369,7 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, // paints the whole menu item, so translate position (and it'll be clipped); // it is also necessary to fill the background transparently first, as this // is painted after menuitem highlight, otherwise there would be a grey area + assert( value.getType() == CTRL_MENU_POPUP ); const MenupopupValue* menuVal = static_cast<const MenupopupValue*>(&value); QRect menuItemRect( region2QRect( menuVal->maItemRect )); QRect rect( menuItemRect.topLeft() - widgetRect.topLeft(), |