aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-09-26 10:06:07 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-09-26 13:45:03 +0400
commitac16717f4eb6d339ae0a544ac35b8305ffc8802e (patch)
tree9a7d8ba7b72928b8b886ceea49e80fe558d77505 /src/handlers
parent52aee11aa5ee6a027062d23719f3473149a19a31 (diff)
downloadniri-ac16717f4eb6d339ae0a544ac35b8305ffc8802e.tar.gz
niri-ac16717f4eb6d339ae0a544ac35b8305ffc8802e.tar.bz2
niri-ac16717f4eb6d339ae0a544ac35b8305ffc8802e.zip
Avoid unwraps in more places
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index 95fc3fa9..e99cc5ce 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -89,7 +89,10 @@ impl DmabufHandler for State {
_global: &DmabufGlobal,
dmabuf: Dmabuf,
) -> Result<(), ImportError> {
- match self.backend.renderer().import_dmabuf(&dmabuf, None) {
+ let renderer = self.backend.renderer().expect(
+ "the dmabuf global must be created and destroyed together with the output device",
+ );
+ match renderer.import_dmabuf(&dmabuf, None) {
Ok(_texture) => Ok(()),
Err(err) => {
debug!("error importing dmabuf: {err:?}");