From: Glenn Watson Date: Mon, 31 Oct 2011 03:06:44 +0000 (+1000) Subject: Fix crash when trying to access a missing texture. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=6013a61effd7517f4d659902391f89bee29ec3fe;p=konrad%2Fqtdeclarative.git 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 --- 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) {