Skip to content

Commit 50907fa

Browse files
committed
Fix rare crash
1 parent 495598c commit 50907fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/BackgroundBlurEffect.vala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@ public class Gala.BackgroundBlurEffect : Clutter.Effect {
340340
var width = (int) actor_box.get_width ();
341341
var height = (int) actor_box.get_height ();
342342

343+
if (width < 0 || height < 0) {
344+
warning ("BackgroundBlurEffect: Couldn't update framebuffers, incorrect size");
345+
return false;
346+
}
347+
343348
var downscale_factor = calculate_downscale_factor (width, height, real_blur_radius);
344349

345350
var updated = update_actor_fbo (width, height, downscale_factor) && update_rounded_fbo (width, height, downscale_factor) && update_background_fbo (width, height);

0 commit comments

Comments
 (0)