diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-01-01 09:57:51 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-01-01 17:31:58 +0400 |
| commit | ac6ff7ff410a5874680dbfd1cf1023dabc623c43 (patch) | |
| tree | 9412784c2fc5036c42bbb8bfd6aa7ec8495e4422 /src/handlers | |
| parent | 84befb4e911245e7d28e939083004b512d34e8b2 (diff) | |
| download | niri-ac6ff7ff410a5874680dbfd1cf1023dabc623c43.tar.gz niri-ac6ff7ff410a5874680dbfd1cf1023dabc623c43.tar.bz2 niri-ac6ff7ff410a5874680dbfd1cf1023dabc623c43.zip | |
tty: Disable dmabuf global before destroying
Diffstat (limited to 'src/handlers')
| -rw-r--r-- | src/handlers/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index 42f83a62..f7d94ed0 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -202,9 +202,11 @@ impl DmabufHandler for State { dmabuf: Dmabuf, notifier: ImportNotifier, ) { - let renderer = self.backend.renderer().expect( - "the dmabuf global must be created and destroyed together with the output device", - ); + let Some(renderer) = self.backend.renderer() else { + notifier.failed(); + return; + }; + match renderer.import_dmabuf(&dmabuf, None) { Ok(_texture) => { let _ = notifier.successful::<State>(); |
