summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-17 19:04:35 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-17 19:09:24 +0100
commit68e10304389fee75bc069d25c5bfe4b50d0b58a4 (patch)
tree6cde1b0f397a1fee16cb52b9705e41d427f0ac65
parentcoverity: fix memory leak (diff)
downloadcore-68e10304389fee75bc069d25c5bfe4b50d0b58a4.tar.gz
core-68e10304389fee75bc069d25c5bfe4b50d0b58a4.zip
coverity: make clear that this is safe
Change-Id: Ibcc313700862e0dcb630e98a13e451d3b5035a7f
-rw-r--r--sc/source/core/data/postit.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 5ca89b12f2bb..00ec727240c8 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1038,7 +1038,8 @@ ScPostIt* ScNotes::GetOrCreateNote(const ScAddress& rPos)
else
{
ScPostIt* pPostIt = new ScPostIt(*mpDoc, rPos, false);
- insert(rPos, pPostIt);
+ if(!insert(rPos, pPostIt))
+ assert(false);
return pPostIt;
}
}