--- vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx.orig 2017-02-01 23:26:44.258083000 -0500 +++ vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx 2017-02-01 23:28:54.043530000 -0500 @@ -418,17 +418,18 @@ static void dialog_remove_buttons(GtkWidget *pActionArea) { - GList *pChildren = - gtk_container_get_children( GTK_CONTAINER( pActionArea ) ); + GtkContainer * container = GTK_CONTAINER( pActionArea ); - for( GList *p = pChildren; p; p = p->next ) + if( container ) { - GtkWidget *pWidget = GTK_WIDGET( p->data ); - if ( GTK_IS_BUTTON( pWidget ) ) - gtk_widget_destroy( pWidget ); - } + GList *pChildren = + gtk_container_get_children( container ); + + for( GList *p = pChildren; p; p = p->next ) + gtk_widget_destroy( GTK_WIDGET( p->data ) ); - g_list_free( pChildren ); + g_list_free( pChildren ); + } } static void