Don't use nested scope local variable for error

svn path=/trunk/; revision=864
This commit is contained in:
Colin Walters 2008-11-05 22:09:44 +00:00
parent 65b8727e57
commit b918bb5e8c

View File

@ -163,7 +163,8 @@ g_function_info_invoke (GIFunctionInfo *info,
gint n_args, n_invoke_args, in_pos, out_pos, i;
gpointer *args;
gboolean success = FALSE;
GError *local_error;
GError *local_error = NULL;
gpointer error_address = &local_error;
symbol = g_function_info_get_symbol (info);
@ -288,11 +289,9 @@ g_function_info_invoke (GIFunctionInfo *info,
g_base_info_unref ((GIBaseInfo *)ainfo);
}
local_error = NULL;
if (throws)
{
gpointer address = &local_error;
args[n_invoke_args - 1] = &address;
args[n_invoke_args - 1] = &error_address;
atypes[n_invoke_args - 1] = &ffi_type_pointer;
}