summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-15 10:19:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-15 10:19:17 +0000
commitccd6ed5e3b3978822c00020fbc6baeb4af6628a5 (patch)
tree6b24096a8cb7757cc38fb01e498219f8d06019cd
parent933c85431d57139a60751b4132155f42d62da64b (diff)
no need to check pRscString on every iteration
Change-Id: Icfcf2ca8efbaeaaa8fdddaa57496622a113027f7
-rw-r--r--sc/source/core/data/global.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 4e587140ce38..7ff840b4261a 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -599,10 +599,13 @@ void ScGlobal::Clear()
DELETEZ(pAddInCollection);
DELETEZ(pUserList);
- for( sal_uInt16 nC = 0 ; nC < SC_GLOBSTR_STR_COUNT ; nC++ )
- if( ppRscString ) delete ppRscString[ nC ];
- delete[] ppRscString;
- ppRscString = nullptr;
+ if (ppRscString)
+ {
+ for (sal_uInt16 nC = 0; nC < SC_GLOBSTR_STR_COUNT; ++nC)
+ delete ppRscString[nC];
+ delete[] ppRscString;
+ ppRscString = nullptr;
+ }
DELETEZ(pStarCalcFunctionList); // Destroy before ResMgr!
DELETEZ(pStarCalcFunctionMgr);