summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-15 21:07:40 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-15 22:33:16 +0100
commit8426af90fce68eb1762f4774d7428cc2b2d20013 (patch)
treeb1e6920af133eb48823d1093e1713310ff2c7875 /sc
parentf6251134c94c5424dac633a107e07a2403e3a56d (diff)
don't access freed memory
Change-Id: I3839d9af55c7dcd29d34850618a33c6c3b1ee2ec
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/postit.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index b9bec3f98ce2..5ca89b12f2bb 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -845,6 +845,9 @@ ScPostIt* ScNoteUtil::CreateNoteFromCaption(
// ScNoteCaptionCreator c'tor updates the caption object to be part of a note
ScNoteCaptionCreator aCreator( rDoc, rPos, rCaption, bShown );
}
+ else
+ return NULL;
+
return pNote;
}