summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx')
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
index e8e45784da79..ec1b0c8910cb 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -89,7 +89,7 @@ void SAL_CALL SalGtkFolderPicker::setDisplayDirectory( const rtl::OUString& aDir
OString aTxt = unicodetouri( aDirectory );
- if( aTxt.lastIndexOf('/') == aTxt.getLength() - 1 )
+ if( aTxt.lastIndexOf('/') == aTxt.getLength() - 1 && !aTxt.isEmpty() )
aTxt = aTxt.copy( 0, aTxt.getLength() - 1 );
OSL_TRACE( "setting path to %s", aTxt.getStr() );