[mutter] clutter/paint-node: Remove unnecessary NULL check in get_framebuffer()



commit 5145b33e01015105d8c773b1d3598eda4a3a8dcb
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Nov 22 09:36:26 2019 +0100

    clutter/paint-node: Remove unnecessary NULL check in get_framebuffer()
    
    The only way we would ever get NULL there is if the node passed to the
    function is NULL, and that is invalid input to begin with.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/935

 clutter/clutter/clutter-paint-node.c | 3 ---
 1 file changed, 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-paint-node.c b/clutter/clutter/clutter-paint-node.c
index bb23486ad..efdaef0e6 100644
--- a/clutter/clutter/clutter-paint-node.c
+++ b/clutter/clutter/clutter-paint-node.c
@@ -1213,9 +1213,6 @@ clutter_paint_node_get_framebuffer (ClutterPaintNode *node)
   ClutterPaintNode *root = clutter_paint_node_get_root (node);
   ClutterPaintNodeClass *klass;
 
-  if (root == NULL)
-    return NULL;
-
   klass = CLUTTER_PAINT_NODE_GET_CLASS (root);
   if (klass->get_framebuffer != NULL)
     return klass->get_framebuffer (root);


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