summaryrefslogtreecommitdiff
path: root/vcl/win/source
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-03-21 15:27:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-10 09:46:56 +0100
commitc2cb5f47f04cfce498943bad08d18b891c680f19 (patch)
treefd33d2c1944ec1200351e0e5bf228b3dc5da593d /vcl/win/source
parent064457db3ede211d3130f42c9dfaa17ea24a6aa5 (diff)
Related: #i112873# check native widget's control value type...
before converting to SpinbuttonValue or ScrollbarValue Else problems like #i112873# or even crashes can and do happen. (cherry picked from commit d2fde1d34c3c28572b1b6b4780269c15dd4c2bef) Conflicts: vcl/unx/kde/salnativewidgets-kde.cxx Change-Id: I6429205ab41b3194577bc50aa02384c920e11ed2
Diffstat (limited to 'vcl/win/source')
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 842d06d63917..07f0fb908ed4 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -650,7 +650,7 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
{
if( aValue.getType() == CTRL_SPINBUTTONS )
{
- const SpinbuttonValue *pValue = static_cast<const SpinbuttonValue*>(&aValue);
+ const SpinbuttonValue* pValue = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue*>(&aValue) : NULL;
sal_Bool bOk = sal_False;
RECT rect;