From bd60b650feaeb65ae73d93513f8de8203f168dc5 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH] basmgr: Use SvRef::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Id539b0e2630013c4f07debf22eaeca1b45403fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211841 Reviewed-by: Neil Roberts Tested-by: Jenkins --- basic/source/basmgr/basmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index a98e22979417..509ef1e8e210 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1047,7 +1047,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName, pLibInfo = nullptr; } - return pLibInfo ? &*pLibInfo->GetLib() : nullptr; + return pLibInfo ? pLibInfo->GetLib().get() : nullptr; }