aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4errorobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-02-13 14:08:33 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-21 14:21:42 +0000
commit10942bd94b20bc72dd699425bb0431524148e742 (patch)
tree3ba63ffaa988db5ad1584ab76759882caf382c5f /src/qml/jsruntime/qv4errorobject_p.h
parent331033c77416daf41532fc9ac20cd560428fe648 (diff)
Remove last asFoo() methods from Managed
Also add some safety checks in case the heap pointer inside the Value is 0. Change-Id: I61d37410c10c34f197175dbbd9ea8fa8c95c12cd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4errorobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4errorobject_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h
index 7451c9fdf5..e26654e931 100644
--- a/src/qml/jsruntime/qv4errorobject_p.h
+++ b/src/qml/jsruntime/qv4errorobject_p.h
@@ -142,7 +142,7 @@ struct ErrorObject: Object {
template<>
inline const ErrorObject *Value::as() const {
- return isManaged() && m->vtable->isErrorObject ? reinterpret_cast<const ErrorObject *>(this) : 0;
+ return isManaged() && m && m->vtable->isErrorObject ? reinterpret_cast<const ErrorObject *>(this) : 0;
}
struct EvalErrorObject: ErrorObject {