Fix crash (null pointer dereference).
authorAlbin Olsson <albin.olsson@cybercom.com>
Fri, 15 Nov 2013 09:39:34 +0000 (10:39 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 18 Nov 2013 07:44:53 +0000 (08:44 +0100)
commit249067c698f02b7317a107e6636abf1492c6a888
tree51eb79167f9b7c1b2bc04aae373276d5548f13e3
parent418295d306e31b6055ec526111c253a8249a207f
Fix crash (null pointer dereference).

When accessing the path property of a RouteSegment, QtLocation will
crash when trying to create a QJSValue. A call too QQmlEngine::contextForObject
returns a null pointer because a context has not been set. This patch
fixes the problem by properly setting the context when creating the QObjects.

Change-Id: I9dc4a1e7c1b5b6db64a54c21121e72272f333ab4
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
src/imports/location/qdeclarativegeoroute.cpp
src/imports/location/qdeclarativegeoroutemodel.cpp