summaryrefslogtreecommitdiffstats
path: root/glow/src/backend.rs
diff options
context:
space:
mode:
Diffstat (limited to 'glow/src/backend.rs')
-rw-r--r--glow/src/backend.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/glow/src/backend.rs b/glow/src/backend.rs
index 9212761e..5ab7f922 100644
--- a/glow/src/backend.rs
+++ b/glow/src/backend.rs
@@ -79,6 +79,11 @@ impl Backend {
target_height: u32,
) {
let mut bounds = (layer.bounds * scale_factor).snap();
+
+ if bounds.width < 1 || bounds.height < 1 {
+ return;
+ }
+
bounds.height = bounds.height.min(target_height);
if !layer.quads.is_empty() {