1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:48:14 +00:00

Kernel/Graphics: Indicate initialization failed if no device was found

This commit is contained in:
Liav A 2021-05-21 11:23:41 +03:00 committed by Linus Groh
parent 95a11d5737
commit c6ffee7f18

View file

@ -16,6 +16,7 @@
#include <Kernel/Graphics/VGACompatibleAdapter.h>
#include <Kernel/IO.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Panic.h>
#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel {
@ -140,6 +141,10 @@ UNMAP_AFTER_INIT bool GraphicsManagement::initialize()
}
display_adapter->initialize_framebuffer_devices();
});
if (m_graphics_devices.is_empty()) {
dbgln("No graphics adapter was initialized.");
return false;
}
return true;
}