diff options
Diffstat (limited to 'camel/gmime-content-field.c')
-rw-r--r-- | camel/gmime-content-field.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/camel/gmime-content-field.c b/camel/gmime-content-field.c index d838c5c8de..536d15e82a 100644 --- a/camel/gmime-content-field.c +++ b/camel/gmime-content-field.c @@ -74,7 +74,8 @@ _free_parameter (gpointer name, gpointer value, gpointer user_data) void gmime_content_field_free (GMimeContentField *content_field) { - g_assert (content_field); + if (!content_field) return; + g_hash_table_foreach (content_field->parameters, _free_parameter, NULL); g_free (content_field->type); g_free (content_field->subtype); @@ -110,6 +111,8 @@ gmime_content_field_ref (GMimeContentField *content_field) void gmime_content_field_unref (GMimeContentField *content_field) { + if (!content_field) return; + content_field->ref -= 1; if (content_field->ref <= 0) gmime_content_field_free (content_field); |