aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input.rs b/src/input.rs
index 888bf785..dc443365 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -153,10 +153,10 @@ impl State {
Action::Screenshot => {
let active = self.niri.monitor_set.active_output().cloned();
if let Some(active) = active {
- if let Err(err) =
- self.niri.screenshot(self.backend.renderer(), &active)
- {
- warn!("error taking screenshot: {err:?}");
+ if let Some(renderer) = self.backend.renderer() {
+ if let Err(err) = self.niri.screenshot(renderer, &active) {
+ warn!("error taking screenshot: {err:?}");
+ }
}
}
}