diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-27 15:53:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-05 09:18:15 +0000 |
commit | ae8bb0032fdd9007b0fd716aab2648af7754d48a (patch) | |
tree | bdacfdbf05db949e1caa0d48eacf7c531d2513fe | |
parent | 6c546d4736cfc62e1dfb2d5792346899df67e462 (diff) |
better to have test for isEmpty first
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 2 |
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() ); |