linkdlg: Use SvRef::get() instead of &*

Using &* can be problematic if the pointer is null. In this case it
probably doesn’t matter, but using SvRef::get() is probably easier to
understand anyway. This also paves the way for a later compiler plugin
to check for this.

Change-Id: I26aa62d78454d11c9912bdd3e9ab9db2d93293a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211847
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Neil Roberts
2026-10-07 19:15:58 +02:00
parent 7c361df048
commit 99f157a04f
+1 -1
View File
@@ -481,7 +481,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink&, _rLink, void )
// edited link needs to be refreshed.
bool bLinkFnd = false;
for( size_t n = pLinkMgr->GetLinks().size(); n; )
if( &_rLink == &(*pLinkMgr->GetLinks()[ --n ]) )
if( &_rLink == pLinkMgr->GetLinks()[ --n ].get() )
{
bLinkFnd = true;
break;