[Libreoffice-commits] core.git: vcl/unx

Michael Meeks michael.meeks at collabora.com
Sun May 3 05:52:03 PDT 2015


 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 58b76d531b7fe3a810b39a38b0a2ba62b710eee7
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Sun May 3 14:50:37 2015 +0200

    tdf#91043 - attempted fix of filer-less gtk+ save dialog crash.
    
    Change-Id: If307f233d5db1520c307443321fa855e044c3de9

diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 796db52..feda439 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


More information about the Libreoffice-commits mailing list