clutter-offscreen-effect: Disable if no texture
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 11 Oct 2018 07:02:05 +0000 (07:02 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 14 Mar 2019 18:39:31 +0000 (18:39 +0000)
commit68e7c61f441e5cf254964e53d89b7bcb7bc1b60f
tree9a85d0031c4eb69440b12298f3a18d1721d08727
parentf07598eb6f6d5306f0971d391ef0356f7e06e372
clutter-offscreen-effect: Disable if no texture

If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `update_fbo` would return `FALSE` but leaves `priv->offscreen`
as non-NULL. So the next paint will try to use the offscreen with a
`NULL` texture and crashes. The solution is simply to ensure that
`priv->offscreen` is NULL if there is no `priv->texture`, so the default
(non-offscreen) paint path gets used instead.

Bug reported and fix provided by Gert van de Kraats.

(cherry picked from commit f31cf0c3ef99b27c0b2c0161fc9fc1eb82778b2e)

(cherry picked from commit 1b78ca8c5eef39831639a0bde8d613cd1bb024dc)

Bug-Ubuntu: https://launchpad.net/bugs/1795774
Applied-upstream: 3.30.3, commit:c6223ffea87831f9bd51d11c50e953f0318459e0

Gbp-Pq: Name clutter-offscreen-effect-Disable-if-no-texture.patch
clutter/clutter/clutter-offscreen-effect.c