summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 ec1b0c8910cb..672c25a0bb08 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 && !aTxt.isEmpty() )
+ if( !aTxt.isEmpty() && aTxt.lastIndexOf('/') == aTxt.getLength() - 1 )
aTxt = aTxt.copy( 0, aTxt.getLength() - 1 );
OSL_TRACE( "setting path to %s", aTxt.getStr() );