[gjs: 44/45] gi: do not collect user_data argument(s) for callbacks when not passed
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 44/45] gi: do not collect user_data argument(s) for callbacks when not passed
- Date: Tue, 2 Mar 2010 18:55:45 +0000 (UTC)
commit f69e5c6d4eec2a1e67c59e309367b027e99cf01e
Author: Tommi Komulainen <tko litl com>
Date: Tue Mar 2 13:11:52 2010 +0000
gi: do not collect user_data argument(s) for callbacks when not passed
https://bugzilla.gnome.org/show_bug.cgi?id=611590
gi/function.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gi/function.c b/gi/function.c
index 277611e..9f6bc09 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -372,9 +372,10 @@ gjs_callback_from_arguments(JSContext *context,
return FALSE;
}
- g_assert_cmpuint(*argv_pos, <, argc);
- gjs_callback_info_add_argument(context, callback_info, argv[*argv_pos]);
- (*argv_pos)--;
+ if (*argv_pos < argc) {
+ gjs_callback_info_add_argument(context, callback_info, argv[*argv_pos]);
+ (*argv_pos)--;
+ }
is_notify = TRUE;
invoke_info->callback_info = *callback_info;
*all_invoke_infos = g_slist_prepend(*all_invoke_infos, invoke_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]