Ensure that zero-length array translates to NULL

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3498 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-03-25 11:18:57 +00:00
parent 4901747c77
commit a95ec1b046

View file

@ -241,6 +241,10 @@ nm_object_array_demarshal (GValue *value,
g_warning ("%s: couldn't create object for %s", __func__, path);
}
}
if (temp->len == 0) {
g_ptr_array_free (temp, TRUE);
temp = NULL;
}
}
/* Deallocate after to ensure that an object that might already