CID#1103774 avoid use after free

Change-Id: I0cbe52bf48fb9a2611043c6c3e187b9db4414365
This commit is contained in:
Caolán McNamara
2013-10-11 09:10:46 +01:00
parent 015c00b62f
commit 17605133e0

View File

@@ -198,13 +198,14 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
Check( MN_READONLY_OPENURL, SID_OPENDOC, rDis );
Check( MN_READONLY_OPENURLNEW, SID_OPENDOC, rDis );
SfxPoolItem* pState;
SfxPoolItem* pState = NULL;
SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState );
Check( MN_READONLY_COPY, SID_COPY, rDis );
if(eState < SFX_ITEM_AVAILABLE)
EnableItem( MN_READONLY_COPY, sal_False );
delete pState;
pState = NULL;
eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
if (