summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
Diffstat (limited to 'store')
-rw-r--r--store/source/lockbyte.cxx3
-rw-r--r--store/source/storbase.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx
index 40c098f52ac4..b947dd0e3b97 100644
--- a/store/source/lockbyte.cxx
+++ b/store/source/lockbyte.cxx
@@ -601,7 +601,8 @@ oslInterlockedCount SAL_CALL MappedLockBytes::release()
void MappedLockBytes::allocate_Impl (void ** ppPage, sal_uInt16 * pnSize)
{
OSL_PRECOND((ppPage != 0) && (pnSize != 0), "contract violation");
- *ppPage = 0, *pnSize = m_nPageSize;
+ if ((ppPage != 0) && (pnSize != 0))
+ *ppPage = 0, *pnSize = m_nPageSize;
}
void MappedLockBytes::deallocate_Impl (void * pPage)
diff --git a/store/source/storbase.cxx b/store/source/storbase.cxx
index 78e311b28fa0..8fd79ba27eff 100644
--- a/store/source/storbase.cxx
+++ b/store/source/storbase.cxx
@@ -159,7 +159,8 @@ PageData::Allocator_Impl::~Allocator_Impl()
void PageData::Allocator_Impl::allocate_Impl (void ** ppPage, sal_uInt16 * pnSize)
{
OSL_PRECOND((ppPage != 0) && (pnSize != 0), "contract violation");
- *ppPage = rtl_cache_alloc(m_page_cache), *pnSize = m_page_size;
+ if ((ppPage != 0) && (pnSize != 0))
+ *ppPage = rtl_cache_alloc(m_page_cache), *pnSize = m_page_size;
}
void PageData::Allocator_Impl::deallocate_Impl (void * pPage)