summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bar_state.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bar_state.rs b/src/bar_state.rs
index 2cbb677..a7937e2 100644
--- a/src/bar_state.rs
+++ b/src/bar_state.rs
@@ -327,6 +327,10 @@ impl Surface {
}
fn draw(&mut self, blocks: &[Block], blocks_cache: &mut Vec<ComputedBlock>) {
+ if self.dimensions == (0, 0) {
+ return;
+ }
+
let config = self.config.borrow();
let stride = 4 * self.dimensions.0 as i32;