From 577e5e2e1abf77e000cf870c72aaeace35b84bd4 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 25 Mar 2013 17:24:01 -0400 Subject: [PATCH] background: don't tank if background is destroyed before it gets a pipeline Right now we call unset_texture from MetaBackground's dispose method. unset_texture assumes there's a pipeline available, but there may not be if the object was just created. This commit fixes that incorrect assumption. https://bugzilla.gnome.org/show_bug.cgi?id=696157 --- src/compositor/meta-background.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c index 3380957ee..d15b06cd9 100644 --- a/src/compositor/meta-background.c +++ b/src/compositor/meta-background.c @@ -704,7 +704,8 @@ static void unset_texture (MetaBackground *self) { MetaBackgroundPrivate *priv = self->priv; - cogl_pipeline_set_layer_texture (priv->pipeline, 0, NULL); + if (priv->pipeline != NULL) + cogl_pipeline_set_layer_texture (priv->pipeline, 0, NULL); g_clear_pointer (&priv->texture, (GDestroyNotify)