glib/gvariant.c: Fix NULL pointer check in is_valid_heap_iter

https://bugzilla.gnome.org/show_bug.cgi?id=769245
This commit is contained in:
Yury Usishchev 2016-07-28 00:41:38 +03:00 committed by Colin Walters
parent bc40c7a05c
commit 1be86b3d18

View File

@ -2916,8 +2916,8 @@ struct heap_iter
#define GVHI_MAGIC ((gsize) 1450270775u)
#define is_valid_iter(i) (i != NULL && \
GVSI(i)->magic == GVSI_MAGIC)
#define is_valid_heap_iter(i) (GVHI(i)->magic == GVHI_MAGIC && \
is_valid_iter(i))
#define is_valid_heap_iter(i) (is_valid_iter(i) && \
GGVHI(i)->magic == GVHI_MAGIC)
/**
* g_variant_iter_new: