diff options
Diffstat (limited to 'qobject/qfloat.c')
-rw-r--r-- | qobject/qfloat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qobject/qfloat.c b/qobject/qfloat.c index 7de0992..c865163 100644 --- a/qobject/qfloat.c +++ b/qobject/qfloat.c @@ -51,9 +51,9 @@ double qfloat_get_double(const QFloat *qf) */ QFloat *qobject_to_qfloat(const QObject *obj) { - if (qobject_type(obj) != QTYPE_QFLOAT) + if (!obj || qobject_type(obj) != QTYPE_QFLOAT) { return NULL; - + } return container_of(obj, QFloat, base); } |