From 820a41cb8f3eec78e9315bf4916f70e16c5c9d40 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 31 Oct 2014 18:47:43 +0100 Subject: [PATCH] Protect gswe_house_data_unref() from NULL pointers --- src/gswe-house-data.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gswe-house-data.c b/src/gswe-house-data.c index 0fead03..4e3f129 100644 --- a/src/gswe-house-data.c +++ b/src/gswe-house-data.c @@ -94,6 +94,10 @@ gswe_house_data_ref(GsweHouseData *house_data) void gswe_house_data_unref(GsweHouseData *house_data) { + if (house_data == NULL) { + return; + } + if (--house_data->refcount == 0) { gswe_house_data_free(house_data); }