basmgr: 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: Id539b0e2630013c4f07debf22eaeca1b45403fcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211841
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Neil Roberts
2026-10-07 19:14:40 +02:00
parent 0ef39cbc0b
commit bd60b650fe
+1 -1
View File
@@ -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;
}