diff options
-rw-r--r-- | sal/osl/all/filepath.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sal/osl/all/filepath.cxx b/sal/osl/all/filepath.cxx index 7e8022f4f9e8..ae917c6d90ed 100644 --- a/sal/osl/all/filepath.cxx +++ b/sal/osl/all/filepath.cxx @@ -19,6 +19,7 @@ #include <osl/file.h> #include <rtl/ustring.h> +#include <cassert> static sal_uInt32 osl_defCalcTextWidth( rtl_uString *ustrText ) { @@ -49,6 +50,8 @@ oslFileError SAL_CALL osl_abbreviateSystemPath( rtl_uString *ustrSystemPath, rtl } } + assert(ustrPath && ustrFile); + uPathWidth = pfnCalcWidth( ustrPath ); uFileWidth = pfnCalcWidth( ustrFile ); @@ -101,11 +104,8 @@ oslFileError SAL_CALL osl_abbreviateSystemPath( rtl_uString *ustrSystemPath, rtl uPathWidth = pfnCalcWidth( *pustrCompacted ); } - if ( ustrPath ) - rtl_uString_release( ustrPath ); - - if ( ustrFile ) - rtl_uString_release( ustrFile ); + rtl_uString_release(ustrPath); + rtl_uString_release(ustrFile); return osl_File_E_None; } |