[Xfce4-commits] [apps/xfdashboard] 01/01: Check that fill canvas is set when allocating XfdashboardBackground actor.
    noreply at xfce.org 
    noreply at xfce.org
       
    Thu Jan 14 13:46:26 CET 2016
    
    
  
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit f9767ae7f12a5f5b97983ac3a229c28f18645a9d
Author: Stephan Haller <nomad at froevel.de>
Date:   Thu Jan 14 13:43:42 2016 +0100
    Check that fill canvas is set when allocating XfdashboardBackground actor.
    
    At some circumstances that variable was not set (anymore?) and critical messages of clutter_canvas_set_size about CLUTTER_IS_CANVAS() failures were thrown. Maybe that XfdashboardBackground was already disposed which causes the fill canvas object to be destroyed but the allocation function was called anyway. Checking the pointer should silence this warnings ;)
---
 xfdashboard/background.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/xfdashboard/background.c b/xfdashboard/background.c
index c565368..1154a48 100644
--- a/xfdashboard/background.c
+++ b/xfdashboard/background.c
@@ -223,9 +223,12 @@ static void _xfdashboard_background_allocate(ClutterActor *self,
 	CLUTTER_ACTOR_CLASS(xfdashboard_background_parent_class)->allocate(self, inBox, inFlags);
 
 	/* Set size of canvas */
-	clutter_canvas_set_size(CLUTTER_CANVAS(priv->fillCanvas),
-								clutter_actor_box_get_width(inBox),
-								clutter_actor_box_get_height(inBox));
+	if(priv->fillCanvas)
+	{
+		clutter_canvas_set_size(CLUTTER_CANVAS(priv->fillCanvas),
+									clutter_actor_box_get_width(inBox),
+									clutter_actor_box_get_height(inBox));
+	}
 }
 
 /* IMPLEMENTATION: GObject */
-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
    
    
More information about the Xfce4-commits
mailing list