aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-05-12 09:42:16 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-05-12 12:56:49 +0200
commit434eb95e65b97809ec7aeca042bf76071dd17993 (patch)
tree20e7cf47041c0fbf501744b4774d56c6aa0d7417
parentae8f9b5f1192801e9d4591ef8be2d95cc9e48fac (diff)
Don't crash when the shader source is null.
-rw-r--r--src/declarative/scenegraph/util/qsgtextureprovider.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/scenegraph/util/qsgtextureprovider.cpp b/src/declarative/scenegraph/util/qsgtextureprovider.cpp
index b41188772e..2cae0f8f92 100644
--- a/src/declarative/scenegraph/util/qsgtextureprovider.cpp
+++ b/src/declarative/scenegraph/util/qsgtextureprovider.cpp
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
*/
QSGTextureProvider *QSGTextureProvider::from(QObject *object)
{
- return static_cast<QSGTextureProvider *>(object->qt_metacast("QSGTextureProvider"));
+ return object ? static_cast<QSGTextureProvider *>(object->qt_metacast("QSGTextureProvider")) : 0;
}