From 6013a61effd7517f4d659902391f89bee29ec3fe Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Mon, 31 Oct 2011 13:06:44 +1000 Subject: [PATCH] Fix crash when trying to access a missing texture. Check for valid texture pointer before calling member function to determine if it is part of a texture atlas. Change-Id: Ic36ad21f79c514aa92e4c37c467fb4e5d91b4e60 Reviewed-by: Martin Jones --- src/declarative/items/qquickimage.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/declarative/items/qquickimage.cpp b/src/declarative/items/qquickimage.cpp index 0737957..11de584 100644 --- a/src/declarative/items/qquickimage.cpp +++ b/src/declarative/items/qquickimage.cpp @@ -64,7 +64,7 @@ public: QSGTexture *texture() const { - if (m_texture->isAtlasTexture()) + if (m_texture && m_texture->isAtlasTexture()) const_cast(this)->m_texture = m_texture->removedFromAtlas(); if (m_texture) { -- 1.7.2.5