[Libreoffice-commits] core.git: vcl/unx
Luboš Luňák (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 3 09:45:44 UTC 2019
vcl/unx/generic/gdi/salbmp.cxx | 3 +++
vcl/unx/generic/window/salframe.cxx | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 29ea782d778239c7c8d97350e4a69efdbb77e19c
Author: LuboÅ¡ LuÅák <l.lunak at collabora.com>
AuthorDate: Mon Dec 2 17:17:40 2019 +0100
Commit: LuboÅ¡ LuÅák <l.lunak at collabora.com>
CommitDate: Tue Dec 3 10:43:57 2019 +0100
avoid invalid static_cast when mixing X11 and OpenGL bitmaps
This can happen because lcl_SelectAppIconPixmap() temporarily disables
OpenGL, but in case an icon to be loaded is already cached(?), the bitmap
variant may be OpenGL. Happens when launching LO in OpenGL mode
with the X11 gen backend, and then selecting Writer in the start screen.
Change-Id: I65110dee79769c430eaa8a2cf3dc11119ab02520
Reviewed-on: https://gerrit.libreoffice.org/84246
Tested-by: Jenkins
Reviewed-by: LuboÅ¡ LuÅák <l.lunak at collabora.com>
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index b34b1a80e0e0..20760a452559 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -649,6 +649,9 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
{
Destroy();
+ if( dynamic_cast<const X11SalBitmap*>( &rSSalBmp ) == nullptr )
+ return false;
+
const X11SalBitmap& rSalBmp = static_cast<const X11SalBitmap&>( rSSalBmp );
if( rSalBmp.mpDIB )
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 65da95ac09bf..6de28b224a87 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -322,7 +322,7 @@ static bool lcl_SelectAppIconPixmap( SalDisplay const *pDisplay, SalX11Screen nX
X11SalBitmap *pBitmap = dynamic_cast < X11SalBitmap * >
(aIcon.ImplGetBitmapSalBitmap().get());
- if (!pBitmap) // FIXME: opengl
+ if (!pBitmap) // FIXME: opengl , TODO SKIA
return false;
icon_pixmap = XCreatePixmap( pDisplay->GetDisplay(),
More information about the Libreoffice-commits
mailing list