aboutsummaryrefslogtreecommitdiff
path: root/tests/test-gtk-parser.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-19 23:27:29 -0500
committerTed Gould <ted@gould.cx>2011-09-19 23:27:29 -0500
commit3ea5f5573cc0f0f34591ee12b92d789bf624d784 (patch)
tree51c647d61a4ce3f6c6d20dee0a4a6d41c1c73bab /tests/test-gtk-parser.c
parent4810423912b7f53f716ba5665aba56234461ca6f (diff)
parent0b5f7ed8fcaee4b32db7a1deed1b65ff77688551 (diff)
downloadlibdbusmenu-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.c2
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);