Protect gswe_house_data_unref() from NULL pointers

This commit is contained in:
Gergely Polonkai 2014-10-31 18:47:43 +01:00
parent 185c235b6b
commit 820a41cb8f

View File

@ -94,6 +94,10 @@ gswe_house_data_ref(GsweHouseData *house_data)
void void
gswe_house_data_unref(GsweHouseData *house_data) gswe_house_data_unref(GsweHouseData *house_data)
{ {
if (house_data == NULL) {
return;
}
if (--house_data->refcount == 0) { if (--house_data->refcount == 0) {
gswe_house_data_free(house_data); gswe_house_data_free(house_data);
} }