aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/mod.rs8
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>();