linker: More null check
This commit is contained in:
parent
4846704832
commit
3a80df007e
|
@ -68,9 +68,11 @@ void Linker::Execute() {
|
|||
}
|
||||
|
||||
// Configure used flexible memory size.
|
||||
if (u64* flexible_size = GetProcParam()->mem_param->flexible_memory_size) {
|
||||
if (auto* mem_param = GetProcParam()->mem_param) {
|
||||
if (u64* flexible_size = mem_param->flexible_memory_size) {
|
||||
memory->SetTotalFlexibleSize(*flexible_size);
|
||||
}
|
||||
}
|
||||
|
||||
// Init primary thread.
|
||||
Common::SetCurrentThreadName("GAME_MainThread");
|
||||
|
|
|
@ -206,9 +206,15 @@ int MemoryManager::QueryProtection(VAddr addr, void** start, void** end, u32* pr
|
|||
const auto& vma = it->second;
|
||||
ASSERT_MSG(vma.type != VMAType::Free, "Provided address is not mapped");
|
||||
|
||||
if (start != nullptr) {
|
||||
*start = reinterpret_cast<void*>(vma.base);
|
||||
}
|
||||
if (end != nullptr) {
|
||||
*end = reinterpret_cast<void*>(vma.base + vma.size);
|
||||
}
|
||||
if (prot != nullptr) {
|
||||
*prot = static_cast<u32>(vma.prot);
|
||||
}
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue