You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pa...@apache.org on 2017/11/12 00:12:55 UTC

svn commit: r1814994 - /openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx

Author: pats
Date: Sun Nov 12 00:12:55 2017
New Revision: 1814994

URL: http://svn.apache.org/viewvc?rev=1814994&view=rev
Log:
#127581# Writer crashes after copying all content

Modified:
    openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx

Modified: openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx?rev=1814994&r1=1814993&r2=1814994&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx (original)
+++ openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx Sun Nov 12 00:12:55 2017
@@ -159,9 +159,13 @@ sal_Bool LinkManager::Insert( SvBaseLink
 	SvBaseLinkRef* pTmp = new SvBaseLinkRef( pLink );
     pLink->SetLinkManager( this );
 	aLinkTbl.Insert( pTmp, aLinkTbl.Count() );
-	Window *parent = GetPersist()->GetDialogParent();
 	if (mAutoAskUpdateAllLinks)
 	{
+		Window *parent = NULL;
+		SfxObjectShell* persist = GetPersist();
+		if (persist != NULL)
+			parent = GetPersist()->GetDialogParent();
+
 		SetUserAllowsLinkUpdate(pLink, GetUserAllowsLinkUpdate(parent));
 	}