summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sal/qa/osl/file/osl_File.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index ab22c8549583..54966aca78c9 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -6107,8 +6107,12 @@ namespace osl_Directory
Directory::remove(buffer);
i = rtl_ustr_lastIndexOfChar(buffer, '/');
- buffer[i] = 0;
- Directory::remove(buffer);
+ assert(i != -1);
+ if (i != -1)
+ {
+ buffer[i] = 0;
+ Directory::remove(buffer);
+ }
}
//########################################