Skip to content

Commit

Permalink
Don't crash when the shader source is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gunnar Sletta committed May 12, 2011
1 parent ae8f9b5 commit 434eb95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/declarative/scenegraph/util/qsgtextureprovider.cpp
Expand Up @@ -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;
}


Expand Down

0 comments on commit 434eb95

Please sign in to comment.