> @@ -1919,7 +1919,9 @@ GtkWidget *ui_path_box_new(const gchar *title, 
> GtkFileChooserAction action, GtkE
>       vbox = gtk_vbox_new(FALSE, 0);
>       if (gtk_widget_get_parent(path_entry))  /* entry->parent may be a 
> GtkComboBoxEntry */
>       {
> -             GtkWidget *parent = gtk_widget_get_parent(path_entry);
> +             GtkWidget *parent = path_entry, *next_parent;
> +             while ((next_parent = gtk_widget_get_parent(parent)) != NULL)
> +                     parent = next_parent;

while at it doing something like that, we could simplify the code by always 
resolving the parent and using that, dropping the conditional here -- e.g. 
doing what this block does, but unconditionally.  If the first `get_parent()` 
returns NULL, it's the same as the else block anyway.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/995/files/8539388b6e51dc932fafa21f4c4395355c5d64ee#r59401942

Reply via email to