linker: More null check

This commit is contained in:
IndecisiveTurtle 2024-06-26 18:04:28 +03:00
parent 4846704832
commit 3a80df007e
2 changed files with 13 additions and 5 deletions

View file

@ -68,8 +68,10 @@ void Linker::Execute() {
}
// Configure used flexible memory size.
if (u64* flexible_size = GetProcParam()->mem_param->flexible_memory_size) {
memory->SetTotalFlexibleSize(*flexible_size);
if (auto* mem_param = GetProcParam()->mem_param) {
if (u64* flexible_size = mem_param->flexible_memory_size) {
memory->SetTotalFlexibleSize(*flexible_size);
}
}
// Init primary thread.