summaryrefslogtreecommitdiff
path: root/vcl/unx/kde4
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-02-01 17:36:16 +0100
committerLuboš Luňák <l.lunak@suse.cz>2012-02-01 17:38:59 +0100
commitc161e3652853e7478f79df22e83412ada50f3c6a (patch)
treef36b792074a6ba7050f77e4403a868f19ebf2e9f /vcl/unx/kde4
parent47f16670f05186413d6f5b436d36c0e52059c74a (diff)
add a check before a cast
Diffstat (limited to 'vcl/unx/kde4')
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx1
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(),