diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-26 10:06:07 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-26 13:45:03 +0400 |
| commit | ac16717f4eb6d339ae0a544ac35b8305ffc8802e (patch) | |
| tree | 9a7d8ba7b72928b8b886ceea49e80fe558d77505 /src/handlers | |
| parent | 52aee11aa5ee6a027062d23719f3473149a19a31 (diff) | |
| download | niri-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.rs | 5 |
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:?}"); |
