diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-02-13 14:08:33 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-21 14:21:42 +0000 |
commit | 10942bd94b20bc72dd699425bb0431524148e742 (patch) | |
tree | 3ba63ffaa988db5ad1584ab76759882caf382c5f /src/qml/jsruntime/qv4dateobject_p.h | |
parent | 331033c77416daf41532fc9ac20cd560428fe648 (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/qv4dateobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4dateobject_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h index 200466064a..a4c508a628 100644 --- a/src/qml/jsruntime/qv4dateobject_p.h +++ b/src/qml/jsruntime/qv4dateobject_p.h @@ -82,7 +82,7 @@ struct DateObject: Object { template<> inline const DateObject *Value::as() const { - return isManaged() && m->vtable->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : 0; + return isManaged() && m && m->vtable->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : 0; } struct DateCtor: FunctionObject |