From d6f852ef140d57c82b945fa4ec3954ad9db0a8b1 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 30 Oct 2014 20:28:28 +0200 Subject: Avoid crash Sure, this is probably "defensive coding" and the root cause is my other changes... Change-Id: Ia888921fddc48dc022a3205c7e0abc7e2160cf5c --- sc/source/core/opencl/formulagroupcl.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sc') diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index e77eeb423cc1..3dfcc10d012a 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -2224,7 +2224,10 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments( for (unsigned i = 0; i < nChildren; i++) { - FormulaToken* pChild = ft->Children[i]->GetFormulaToken(); + FormulaTreeNodeRef rChild = ft->Children[i]; + if (!rChild) + throw Unhandled(); + FormulaToken* pChild = rChild->GetFormulaToken(); if (!pChild) throw Unhandled(); OpCode opc = pChild->GetOpCode(); -- cgit