[mutter] shaped-texture: Use actual texture if tower returned NULL



commit 490f27efcbab3d853b0d5ae20b3152881b692e52
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Jan 4 19:05:00 2019 +0100

    shaped-texture: Use actual texture if tower returned NULL
    
    The texture tower can return no texture e.g. if the calculated level is
    negative. This was handled before, but regressed with
    e1370ee209ddf4b864c7275f0d67d8ab64d59029. This fixes a potential crash
    observed occasionally when starting Firefox nightly using the Wayland
    backend in overview mode.

 src/compositor/meta-shaped-texture.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index bf204bc5b..38105e766 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -733,6 +733,8 @@ meta_shaped_texture_paint (ClutterActor *actor)
           stex->fast_updates < MIN_FAST_UPDATES_BEFORE_UNMIPMAP)
         {
           paint_tex = meta_texture_tower_get_paint_texture (stex->paint_tower);
+          if (!paint_tex)
+            paint_tex = stex->texture;
         }
       else
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]