From 0a4f224c0ecb1871f0c53c4163a2ffb47f11bfd2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 28 Mar 2014 10:32:19 +0000 Subject: coverity#736139 Dereference null return value Change-Id: Ibb178c04119373ad848745fe91fea70cbbb0e8a5 --- cui/source/dialogs/linkdlg.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cui/source/dialogs/linkdlg.cxx') diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index b7c95ffac19c..9625ebb6d627 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -373,8 +373,12 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) Links().FirstSelected() : Links().NextSelected( pEntry ); DBG_ASSERT(pEntry,"Where is the entry?"); + if (!pEntry) + continue; pLink = (SvBaseLink*)pEntry->GetUserData(); DBG_ASSERT(pLink,"Where is the link?"); + if (!pLink) + continue; pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, &sLinkName, &sFilter ); INetURLObject aUrl_(sFile); INetURLObject aUrl2(aPath, INET_PROT_FILE); -- cgit