X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Ftypes.c;h=e63394692410ea3f6a885263c5969411caad321d;hp=7369f30d09ffb5a272c3d54f14e5466ac3b005b2;hb=b7e35badc2eac52e27b802a9078bfb7c8f3b04a7;hpb=71444c467e00f96d6b0efaa0eeaaefc4bde615de diff --git a/types/types.c b/types/types.c index 7369f30d..e6339469 100644 --- a/types/types.c +++ b/types/types.c @@ -481,13 +481,17 @@ GQuark new_definition_path(struct definition_scope *parent_scope, GQuark field_n for (i = 0; i < parent_scope->scope_path->len; i++) { GQuark q = g_array_index(parent_scope->scope_path, GQuark, i); - + if (!q) + continue; g_string_append(str, g_quark_to_string(q)); g_string_append(str, "."); } } - g_string_append(str, g_quark_to_string(field_name)); + if (field_name) + g_string_append(str, g_quark_to_string(field_name)); c_str = g_string_free(str, FALSE); + if (c_str[0] == '\0') + return 0; path = g_quark_from_string(c_str); g_free(c_str); return path;