summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/fpicker
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-27 15:53:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-05 09:18:15 +0000
commitae8bb0032fdd9007b0fd716aab2648af7754d48a (patch)
treebdacfdbf05db949e1caa0d48eacf7c531d2513fe /vcl/unx/gtk/fpicker
parent6c546d4736cfc62e1dfb2d5792346899df67e462 (diff)
better to have test for isEmpty first
Diffstat (limited to 'vcl/unx/gtk/fpicker')
-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() );