diff options
Diffstat (limited to 'Kernel/Graphics')
-rw-r--r-- | Kernel/Graphics/VirtIOGPU/VirtIOFrameBufferDevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Graphics/VirtIOGPU/VirtIOFrameBufferDevice.cpp b/Kernel/Graphics/VirtIOGPU/VirtIOFrameBufferDevice.cpp index 4b0ab639c3..b5d8be0c75 100644 --- a/Kernel/Graphics/VirtIOGPU/VirtIOFrameBufferDevice.cpp +++ b/Kernel/Graphics/VirtIOGPU/VirtIOFrameBufferDevice.cpp @@ -245,7 +245,7 @@ KResultOr<Region*> VirtIOFrameBufferDevice::mmap(Process& process, FileDescripti if (m_userspace_mmap_region) return ENOMEM; - auto vmobject = m_are_writes_active ? m_framebuffer->vmobject().clone() : m_framebuffer_sink_vmobject; + auto vmobject = m_are_writes_active ? m_framebuffer->vmobject().try_clone() : m_framebuffer_sink_vmobject; if (vmobject.is_null()) return ENOMEM; @@ -267,7 +267,7 @@ void VirtIOFrameBufferDevice::deactivate_writes() m_are_writes_active = false; if (m_userspace_mmap_region) { auto* region = m_userspace_mmap_region.unsafe_ptr(); - auto vm_object = m_framebuffer_sink_vmobject->clone(); + auto vm_object = m_framebuffer_sink_vmobject->try_clone(); VERIFY(vm_object); region->set_vmobject(vm_object.release_nonnull()); region->remap(); |