summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-11-15 16:09:03 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-11-15 16:10:28 +0100
commit34c1c41817212ca95117cbd1fe582b180007945c (patch)
tree876b59dfb6d9b992030d91346732254d193daecd
parent31bf4242a4eeac718ef4fa8a99eaacfb198249b9 (diff)
vcl: avoid crash with 'gen' backend around window icons.
Change-Id: I4b2bedb9ac641fcb96d09afb2e60fa2c6186fd6b
-rw-r--r--vcl/unx/generic/window/salframe.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 10310c0caf19..ee94a197a791 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -276,9 +276,12 @@ static bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, SalX11Screen nXScreen
aRect.mnDestX = 0; aRect.mnDestY = 0;
aRect.mnDestWidth = iconSize; aRect.mnDestHeight = iconSize;
- X11SalBitmap *pBitmap = static_cast < X11SalBitmap * >
+ X11SalBitmap *pBitmap = dynamic_cast < X11SalBitmap * >
(aIcon.ImplGetBitmapImpBitmap()->ImplGetSalBitmap());
+ if (!pBitmap) // FIXME: opengl
+ return false;
+
icon_pixmap = XCreatePixmap( pDisplay->GetDisplay(),
pDisplay->GetRootWindow( nXScreen ),
iconSize, iconSize,