[gnome-shell] st: Don't try to create shadow for empty texture
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st: Don't try to create shadow for empty texture
- Date: Wed, 5 Jul 2017 15:10:43 +0000 (UTC)
commit d1c71fd00d82b517da439a36ce86ca403c645fa2
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jun 30 00:06:53 2017 +0200
st: Don't try to create shadow for empty texture
Even though the API documentation doesn't say so, the underlying
Cogl texture of a ClutterTexture may be unset, so check for that
case to avoid a runtime warning.
https://bugzilla.gnome.org/show_bug.cgi?id=784353
src/st/st-private.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-private.c b/src/st/st-private.c
index b00a2bd..0db257a 100644
--- a/src/st/st-private.c
+++ b/src/st/st-private.c
@@ -420,7 +420,8 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec,
CoglTexture *texture;
texture = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (actor));
- shadow_pipeline = _st_create_shadow_pipeline (shadow_spec, texture);
+ if (texture)
+ shadow_pipeline = _st_create_shadow_pipeline (shadow_spec, texture);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]