From d01de67d0253ab81011a857f3451162fea983d94 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 6 Dec 2010 11:14:53 -0500 Subject: [PATCH] g_object_info_find_method_using_interfaces: Fix crash if not found If a method wasn't found, we'd try to unref NULL. --- giobjectinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/giobjectinfo.c b/giobjectinfo.c index d6bdce66a..fbf5d8ab2 100644 --- a/giobjectinfo.c +++ b/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; }