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:
@@ -1047,7 +1047,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName,
|
|||||||
pLibInfo = nullptr;
|
pLibInfo = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return pLibInfo ? &*pLibInfo->GetLib() : nullptr;
|
return pLibInfo ? pLibInfo->GetLib().get() : nullptr;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user