framebuffer: fix NULL framebuffer address for non-x86

Change-Id: Ib24d4c04da102f40907002f59550635616b9a290
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6313
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
X512 2022-12-09 06:36:13 +09:00 committed by Fredrik Holmqvist
parent 55d8d19ea9
commit 0ec55fb069

View File

@ -103,7 +103,8 @@ remap_frame_buffer(framebuffer_info& info, addr_t physicalBase, uint32 width,
if (!info.complete_frame_buffer_mapped) {
addr_t base = physicalBase;
size_t size = bytesPerRow * height;
bool remap = !initializing;
// TODO: this logic looks suspicious and may need refactoring
bool remap = !initializing || frameBuffer == 0;
if (info.physical_frame_buffer_size != 0) {
// we can map the complete frame buffer