From b2e2b070c499a04a3e2f270df62d5dd061e0c027 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 28 Jun 2011 08:00:39 +0200 Subject: [PATCH] Don't crash when QSGCanvas::sceneGraphContext() is called prematurly Change-Id: Ib15814bbc095c1be87a8fcddb574444d5258afbb Reviewed-on: http://codereview.qt.nokia.com/813 Reviewed-by: Gunnar Sletta --- src/declarative/items/qsgcanvas.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; } -- 1.7.2.5