aboutsummaryrefslogtreecommitdiff
path: root/qobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'qobject.h')
-rw-r--r--qobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/qobject.h b/qobject.h
index d42386d..9124649 100644
--- a/qobject.h
+++ b/qobject.h
@@ -71,7 +71,7 @@ typedef struct QObject {
/* High-level interface for qobject_decref() */
#define QDECREF(obj) \
- qobject_decref(QOBJECT(obj))
+ qobject_decref(obj ? QOBJECT(obj) : NULL)
/* Initialize an object to default values */
#define QOBJECT_INIT(obj, qtype_type) \