diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-01-04 01:45:19 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-01-04 01:45:19 +0000 |
commit | 846197a5bdd6b9beb338c369193ed49ba39a386a (patch) | |
tree | f8d93bd6df9db6071b231902f3651f644062a5e2 | |
parent | 1c2718400df991fa1dfaca93d31298001d73e458 (diff) | |
download | gtk+-846197a5bdd6b9beb338c369193ed49ba39a386a.tar.gz |
Exit early if we can't get file info - this happens if the iter points to
2007-01-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (update_chooser_entry):
Exit early if we can't get file info - this happens
if the iter points to the row where we are editing
the name for a newly created folder. (#392191, Michael
Partridge, patch by Kristian Rietveld)
svn path=/trunk/; revision=17046
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gtk/gtkfilechooserdefault.c | 6 |
2 files changed, 14 insertions, 0 deletions
@@ -1,5 +1,13 @@ 2007-01-03 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkfilechooserdefault.c (update_chooser_entry): + Exit early if we can't get file info - this happens + if the iter points to the row where we are editing + the name for a newly created folder. (#392191, Michael + Partridge, patch by Kristian Rietveld) + +2007-01-03 Matthias Clasen <mclasen@redhat.com> + * gtk/*.c: * gdk/x11/*.c: Apply a patch by Chris Wilson to avoid spurious valgrind warnings from XSendEvent() diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index f029996091..1e1969f7d5 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -6139,6 +6139,12 @@ update_chooser_entry (GtkFileChooserDefault *impl) info = _gtk_file_system_model_get_info (impl->browse_files_model, &child_iter); + /* If the cursor moved to the row of the newly created folder, + * retrieving info will return NULL. + */ + if (!info) + return; + g_free (impl->browse_files_last_selected_name); impl->browse_files_last_selected_name = g_strdup (gtk_file_info_get_display_name (info)); |