[gimp] app: Add NULL check in gimp_dock_container_get_docks()



commit c70dc8f86d89f6ff2c40dfe9ceaf25120ada622c
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu May 12 06:34:33 2011 +0200

    app: Add NULL check in gimp_dock_container_get_docks()

 app/widgets/gimpdockcontainer.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpdockcontainer.c b/app/widgets/gimpdockcontainer.c
index 3b4c8ce..de63c34 100644
--- a/app/widgets/gimpdockcontainer.c
+++ b/app/widgets/gimpdockcontainer.c
@@ -71,7 +71,14 @@ gimp_dock_container_iface_base_init (GimpDockContainerInterface *container_iface
 GList *
 gimp_dock_container_get_docks (GimpDockContainer *container)
 {
+  GimpDockContainerInterface *iface;
+
   g_return_val_if_fail (GIMP_IS_DOCK_CONTAINER (container), NULL);
 
-  return GIMP_DOCK_CONTAINER_GET_INTERFACE (container)->get_docks (container);
+  iface = GIMP_DOCK_CONTAINER_GET_INTERFACE (container);
+
+  if (iface->get_docks)
+    return iface->get_docks (container);
+  else
+    return NULL;
 }



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