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
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}