summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserwidget.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-07-22 19:07:20 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-07-22 19:16:23 -0400
commit167734c153b062cc479397b745fad2bc739cec95 (patch)
tree5d5e753fe9e830da1ef36ea2ba4bf0b1431dc80b /gtk/gtkfilechooserwidget.c
parent0076b943ad2e83613016bf9aac6294a23048525b (diff)
downloadgtk+-167734c153b062cc479397b745fad2bc739cec95.tar.gz
file chooser: Fix a crash
The save_widgets_create function was not safe against being called multiple times in save mode, calling gtk_file_chooser_set_create_folders was a way to trigger this crash.
Diffstat (limited to 'gtk/gtkfilechooserwidget.c')
-rw-r--r--gtk/gtkfilechooserwidget.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 030d95d94c..40cdd28446 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2559,7 +2559,8 @@ save_widgets_create (GtkFileChooserWidget *impl)
GtkWidget *vbox;
GtkWidget *widget;
- if (priv->save_widgets != NULL)
+ if (priv->save_widgets != NULL ||
+ (priv->external_entry && priv->location_entry == priv->external_entry))
return;
location_switch_to_path_bar (impl);