diff -ur work.orig/libreoffice-5.0.2.2/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx work/libreoffice-5.0.2.2/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx --- work.orig/libreoffice-5.0.2.2/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx 2015-10-05 19:19:56.189936000 +0200 +++ work/libreoffice-5.0.2.2/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx 2015-10-05 19:22:28.876627000 +0200 @@ -421,13 +421,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 ) - gtk_widget_destroy( GTK_WIDGET( p->data ) ); + if( container ) + { + 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