From 9b36512b9453f429644b0c388d381f7a2fc0f825 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 13 May 2019 17:48:42 +0200 Subject: Avoid illegal downcasts in texture and shader handling Fixes bad type-cast during destruction when objects no longer has the full type they used to. Detected by UBSAN. Change-Id: I4867091901d70d5a882656834eb97a704def1751 Reviewed-by: Simon Hausmann --- src/quick/scenegraph/qsgcontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/scenegraph/qsgcontext.cpp') diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index d9ed25c099..53648e352a 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -393,7 +393,7 @@ QSGTexture *QSGRenderContext::textureForFactory(QQuickTextureFactory *factory, Q void QSGRenderContext::textureFactoryDestroyed(QObject *o) { m_mutex.lock(); - m_texturesToDelete << m_textures.take(static_cast(o)); + m_texturesToDelete << m_textures.take(o); m_mutex.unlock(); } -- cgit v1.2.3