reset variables when not owner

Change-Id: Ieab4bf36b89abac2d2ff377fc2b6f31ce0e1d3aa
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 78cd43a..ef15c85 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -695,9 +695,16 @@ void ScCaptionPtr::decRefAndDestroy()
#if 1
        // FIXME: there are still cases where the caption pointer is dangling
        mpCaption = nullptr;
        mbNotOwner = false;
#else
        // Destroying Draw Undo deletes its SdrObject, don't attempt that twice.
        if (!mbNotOwner)
        // Destroying Draw Undo and some other delete the SdrObject, don't
        // attempt that twice.
        if (mbNotOwner)
        {
            mpCaption = nullptr;
            mbNotOwner = false;
        }
        else
        {
            removeFromDrawPageAndFree( true );  // ignoring Undo
            if (mpCaption)