summaryrefslogtreecommitdiffstats
path: root/gobject
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2006-11-18 15:38:46 +0000
committerJohan Dahlin <johan@src.gnome.org>2006-11-18 15:38:46 +0000
commit1063ecd1a4b51e259ef7ababb14d275a3debd021 (patch)
treee61399c878880e190e71c98079405c237e032ed5 /gobject
parentdd9229fcc0ce1123e20f26804d147030cb268a13 (diff)
downloadpygobject-1063ecd1a4b51e259ef7ababb14d275a3debd021.tar.gz
pygobject-1063ecd1a4b51e259ef7ababb14d275a3debd021.tar.xz
pygobject-1063ecd1a4b51e259ef7ababb14d275a3debd021.zip
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)
Diffstat (limited to 'gobject')
-rw-r--r--gobject/pygoptiongroup.c4
1 files changed, 2 insertions, 2 deletions
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);