From: Gunnar Sletta Date: Tue, 28 Jun 2011 06:00:39 +0000 (+0200) Subject: Don't crash when QSGCanvas::sceneGraphContext() is called prematurly X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=b2e2b070c499a04a3e2f270df62d5dd061e0c027;p=konrad%2Fqtdeclarative.git Don't crash when QSGCanvas::sceneGraphContext() is called prematurly Change-Id: Ib15814bbc095c1be87a8fcddb574444d5258afbb Reviewed-on: http://codereview.qt.nokia.com/813 Reviewed-by: Gunnar Sletta --- diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index 97d643d..3abbec3 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -1973,7 +1973,7 @@ void QSGCanvas::maybeUpdate() QSGEngine *QSGCanvas::sceneGraphEngine() const { Q_D(const QSGCanvas); - if (d->context->isReady()) + if (d->context && d->context->isReady()) return d->context->engine(); return 0; }