From 10b88acfd4df8204fbc0763b5c8c90587c7c9a79 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 6 Dec 2010 11:14:53 -0500 Subject: g_object_info_find_method_using_interfaces: Fix crash if not found If a method wasn't found, we'd try to unref NULL. --- girepository/giobjectinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'girepository/giobjectinfo.c') diff --git a/girepository/giobjectinfo.c b/girepository/giobjectinfo.c index d6bdce66..fbf5d8ab 100644 --- a/girepository/giobjectinfo.c +++ b/girepository/giobjectinfo.c @@ -465,7 +465,7 @@ g_object_info_find_method_using_interfaces (GIObjectInfo *info, } if (implementor) *implementor = implementor_result; - else + else if (implementor_result != NULL) g_base_info_unref ((GIBaseInfo*) implementor_result); return result; } -- cgit v1.2.1