summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-03 14:50:37 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-05-03 14:52:19 +0200
commit58b76d531b7fe3a810b39a38b0a2ba62b710eee7 (patch)
tree31a9c0e75cbf4b3ce8f3d3618892a56f90ee936a /vcl
parent4000a0e6524f09612a3fe8f0a6214e0a68b7e007 (diff)
tdf#91043 - attempted fix of filer-less gtk+ save dialog crash.
Change-Id: If307f233d5db1520c307443321fa855e044c3de9
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 796db52baf0e..feda439d28f2 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -758,9 +758,12 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
GtkTreeModel *model;
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{
- gchar *title;
+ gchar *title = NULL;
gtk_tree_model_get (model, &iter, 2, &title, -1);
- sFilterName = OUString( title, strlen( title), RTL_TEXTENCODING_UTF8 );
+ if (title)
+ sFilterName = OUString( title, strlen( title ), RTL_TEXTENCODING_UTF8 );
+ else
+ sFilterName = OUString();
g_free (title);
}
else