From 77d282e4a29006f2a4abe4b0f7bda24bb6855f1c Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 28 Dec 2000 19:48:46 +0000 Subject: Fix a bug in `evolution_shell_client_user_select_folder()' that could cause the function to return without assigning any value to the "out" parameters. svn path=/trunk/; revision=7190 --- shell/ChangeLog | 6 ++++++ shell/evolution-shell-client.c | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 2939947631..df579059bd 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2000-12-28 Ettore Perazzoli + + * evolution-shell-client.c (user_select_folder): Make sure the + `*uri_return' and `*physical_uri_return' are always initialized on + return, as that's what the caller expects. + 2000-12-23 Jason Leach * e-shell-view-menu.c (command_run_bugbuddy): Fix a crash when the diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c index f5cc3ef15c..377f2c21d0 100644 --- a/shell/evolution-shell-client.c +++ b/shell/evolution-shell-client.c @@ -176,6 +176,11 @@ user_select_folder (EvolutionShellClient *shell_client, result = NULL; + if (uri_return != NULL) + *uri_return = NULL; + if (physical_uri_return != NULL) + *physical_uri_return = NULL; + listener_interface = create_folder_selection_listener_interface (&result, uri_return, physical_uri_return); if (listener_interface == CORBA_OBJECT_NIL) @@ -192,17 +197,11 @@ user_select_folder (EvolutionShellClient *shell_client, corba_type_list._buffer = (CORBA_char **) possible_types; GNOME_Evolution_Shell_selectUserFolder (corba_shell, listener_interface, - title, default_folder, &corba_type_list, - &ev); + title, default_folder, &corba_type_list, + &ev); if (ev._major != CORBA_NO_EXCEPTION) { CORBA_exception_free (&ev); - - if (uri_return != NULL) - *uri_return = NULL; - if (physical_uri_return != NULL) - *physical_uri_return = NULL; - return; } -- cgit v1.2.3