diff options
Diffstat (limited to 'qobject')
-rw-r--r-- | qobject/qlist.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qobject/qlist.c b/qobject/qlist.c index 1ced0de58e..298003aaf7 100644 --- a/qobject/qlist.c +++ b/qobject/qlist.c @@ -142,10 +142,9 @@ size_t qlist_size(const QList *qlist) */ QList *qobject_to_qlist(const QObject *obj) { - if (qobject_type(obj) != QTYPE_QLIST) { + if (!obj || qobject_type(obj) != QTYPE_QLIST) { return NULL; } - return container_of(obj, QList, base); } |