aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-10-26 06:28:13 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-10-26 06:28:13 +0800
commitfb5bec84e981634dc04575eda4e4149b3c536923 (patch)
tree61d455af1708a711100167d25fc896423de77b43 /shell/e-shell.c
parent5fe02094b8afe4210e7e720b5fc62b29d91efb95 (diff)
downloadgsoc2013-evolution-fb5bec84e981634dc04575eda4e4149b3c536923.tar.gz
gsoc2013-evolution-fb5bec84e981634dc04575eda4e4149b3c536923.tar.zst
gsoc2013-evolution-fb5bec84e981634dc04575eda4e4149b3c536923.zip
Handle failure from XGetClassHint properly. Also, free res_name and
* e-shell.c (impl_Shell_selectUserFolder): Handle failure from XGetClassHint properly. Also, free res_name and res_class in case of success. Fixes #13554. svn path=/trunk/; revision=14104
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index bfce4e473a..017ee41901 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -483,10 +483,12 @@ impl_Shell_selectUserFolder (PortableServer_Servant servant,
e_set_dialog_parent_from_xid (GTK_WINDOW (folder_selection_dialog), parent_xid);
- XGetClassHint (GDK_DISPLAY (), (Window) parent_xid, &class_hints);
-
- gtk_window_set_wmclass (GTK_WINDOW (folder_selection_dialog),
- class_hints.res_name, class_hints.res_class);
+ if (XGetClassHint (GDK_DISPLAY (), (Window) parent_xid, &class_hints)) {
+ gtk_window_set_wmclass (GTK_WINDOW (folder_selection_dialog),
+ class_hints.res_name, class_hints.res_class);
+ XFree (class_hints.res_name);
+ XFree (class_hints.res_class);
+ }
gtk_widget_show (folder_selection_dialog);