summaryrefslogtreecommitdiffstats
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/compiler.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 350944be3fb6..31f164e65557 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2895,7 +2895,9 @@ sal_Bool ScCompiler::IsNamedRange( const String& rUpperName )
// try local names first
bool bGlobal = false;
ScRangeName* pRangeName = pDoc->GetRangeName(aPos.Tab());
- const ScRangeData* pData = pRangeName->findByUpperName(rUpperName);
+ const ScRangeData* pData = NULL;
+ if (pRangeName)
+ pData = pRangeName->findByUpperName(rUpperName);
if (!pData)
{
pRangeName = pDoc->GetRangeName();