summaryrefslogtreecommitdiff
path: root/sal/osl/unx
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-01-23 13:28:10 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-01-23 13:40:46 +0200
commit5b715f0dd92aeb4c08c53f914b31ee8fe83e0e5d (patch)
tree4e5c7eff22e5dffa6a664e4bc75071d695e4aa8a /sal/osl/unx
parent924d0bdd47ed895592332714be8ee32afe1acebb (diff)
Don't crash when attempting to open non-existent files under /assets
Diffstat (limited to 'sal/osl/unx')
-rw-r--r--sal/osl/unx/file.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 7dd557a7cef5..aa6cc26b4908 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -907,6 +907,8 @@ SAL_CALL osl_openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_u
void *address;
size_t size;
address = lo_apkentry(cpFilePath, &size);
+ if (address == NULL)
+ return osl_File_E_NOENT;
return osl_openMemoryAsFile(address, size, pHandle);
}
#endif