diff options
author | Ted Gould <ted@gould.cx> | 2011-09-19 23:27:29 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-09-19 23:27:29 -0500 |
commit | 3ea5f5573cc0f0f34591ee12b92d789bf624d784 (patch) | |
tree | 51c647d61a4ce3f6c6d20dee0a4a6d41c1c73bab /tests/test-gtk-parser.c | |
parent | 4810423912b7f53f716ba5665aba56234461ca6f (diff) | |
parent | 0b5f7ed8fcaee4b32db7a1deed1b65ff77688551 (diff) | |
download | libdbusmenu-3ea5f5573cc0f0f34591ee12b92d789bf624d784.tar.gz libdbusmenu-3ea5f5573cc0f0f34591ee12b92d789bf624d784.tar.bz2 libdbusmenu-3ea5f5573cc0f0f34591ee12b92d789bf624d784.zip |
Protect the parse from segfaults
Diffstat (limited to 'tests/test-gtk-parser.c')
-rw-r--r-- | tests/test-gtk-parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test-gtk-parser.c b/tests/test-gtk-parser.c index 87b0a7f..afd6194 100644 --- a/tests/test-gtk-parser.c +++ b/tests/test-gtk-parser.c @@ -28,6 +28,8 @@ test_parser_runs (void) { GtkWidget * gmi = gtk_menu_item_new_with_label("Test Item"); g_assert(gmi != NULL); + g_object_ref_sink(gmi); + DbusmenuMenuitem * mi = dbusmenu_gtk_parse_menu_structure(gmi); g_assert(mi != NULL); |