diff options
Diffstat (limited to 'sc/source/core/data/dpsdbtab.cxx')
-rw-r--r-- | sc/source/core/data/dpsdbtab.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx index 72c0f06911b1..194cc412762a 100644 --- a/sc/source/core/data/dpsdbtab.cxx +++ b/sc/source/core/data/dpsdbtab.cxx @@ -136,10 +136,18 @@ void ScDatabaseDPData::SetEmptyFlags( sal_Bool /* bIgnoreEmptyRows */, sal_Bool void ScDatabaseDPData::CreateCacheTable() { if (!aCacheTable.empty()) + // cache table already created. return; if (!aCacheTable.hasCache()) - aCacheTable.setCache(mrImport.CreateCache()); + { + const ScDPCache* pCache = mrImport.CreateCache(); + if (!pCache) + // Cache creation failed. Perhaps invalid database connection. + return; + + aCacheTable.setCache(pCache); + } aCacheTable.fillTable(); } |