summaryrefslogtreecommitdiff
path: root/Kernel/Devices/MBVGADevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Devices/MBVGADevice.cpp')
-rw-r--r--Kernel/Devices/MBVGADevice.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Devices/MBVGADevice.cpp b/Kernel/Devices/MBVGADevice.cpp
index 0c86eccbdd..39a16a8795 100644
--- a/Kernel/Devices/MBVGADevice.cpp
+++ b/Kernel/Devices/MBVGADevice.cpp
@@ -25,6 +25,7 @@ MBVGADevice::MBVGADevice(PhysicalAddress addr, int pitch, int width, int height)
KResultOr<Region*> MBVGADevice::mmap(Process& process, FileDescription&, VirtualAddress preferred_vaddr, size_t offset, size_t size, int prot)
{
+ REQUIRE_PROMISE(video);
ASSERT(offset == 0);
ASSERT(size == framebuffer_size_in_bytes());
auto vmobject = AnonymousVMObject::create_for_physical_range(m_framebuffer_address, framebuffer_size_in_bytes());
@@ -44,6 +45,7 @@ KResultOr<Region*> MBVGADevice::mmap(Process& process, FileDescription&, Virtual
int MBVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg)
{
+ REQUIRE_PROMISE(video);
switch (request) {
case FB_IOCTL_GET_SIZE_IN_BYTES: {
auto* out = (size_t*)arg;