diff --git a/src/libsysprof-analyze/sysprof-strings.c b/src/libsysprof-analyze/sysprof-strings.c index 319d4219..a7c13f4e 100644 --- a/src/libsysprof-analyze/sysprof-strings.c +++ b/src/libsysprof-analyze/sysprof-strings.c @@ -70,6 +70,9 @@ sysprof_strings_get (SysprofStrings *self, { GRefString *ret; + if (string == NULL) + return NULL; + g_mutex_lock (&self->mutex); if (!(ret = g_hash_table_lookup (self->hashtable, string))) { @@ -88,6 +91,9 @@ sysprof_strings_lookup (SysprofStrings *self, { GRefString *ret; + if (string == NULL) + return NULL; + g_mutex_lock (&self->mutex); ret = g_hash_table_lookup (self->hashtable, string); g_mutex_unlock (&self->mutex);