From 1063ecd1a4b51e259ef7ababb14d275a3debd021 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Sat, 18 Nov 2006 15:38:46 +0000 Subject: Make sure an exception is raised when we pass in invalid arguments to the * gobject/pygoptiongroup.c (pyg_option_group_dealloc): * tests/test_option.py (TestOption.testBadConstructor): Make sure an exception is raised when we pass in invalid arguments to the optiongroup constructor, add a test. #364576 (Laszlo Pandy) --- gobject/pygoptiongroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gobject') diff --git a/gobject/pygoptiongroup.c b/gobject/pygoptiongroup.c index 4b284c6..09058d8 100644 --- a/gobject/pygoptiongroup.c +++ b/gobject/pygoptiongroup.c @@ -88,9 +88,9 @@ pyg_option_group_dealloc(PyGOptionGroup *self) if (!self->other_owner && !self->is_in_context) { GOptionGroup *tmp = self->group; - g_assert(tmp != NULL); self->group = NULL; - g_option_group_free(tmp); + if (tmp) + g_option_group_free(tmp); } PyObject_Del(self); -- cgit