[gnome-builder] layout: handle calls before a child is added
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] layout: handle calls before a child is added
- Date: Wed, 19 Jul 2017 11:19:14 +0000 (UTC)
commit 159436f7df981f25a983f048834caaa6975dbcbc
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 14 16:54:17 2017 -0700
layout: handle calls before a child is added
libide/layout/ide-layout-grid.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libide/layout/ide-layout-grid.c b/libide/layout/ide-layout-grid.c
index 38cd428..36832ad 100644
--- a/libide/layout/ide-layout-grid.c
+++ b/libide/layout/ide-layout-grid.c
@@ -630,13 +630,13 @@ IdeLayoutGridColumn *
ide_layout_grid_get_current_column (IdeLayoutGrid *self)
{
IdeLayoutGridPrivate *priv = ide_layout_grid_get_instance_private (self);
- GtkWidget *ret;
+ GtkWidget *ret = NULL;
g_return_val_if_fail (IDE_IS_LAYOUT_GRID (self), NULL);
if (priv->focus_column.head != NULL)
ret = priv->focus_column.head->data;
- else
+ else if (dzl_multi_paned_get_n_children (DZL_MULTI_PANED (self)) > 0)
ret = dzl_multi_paned_get_nth_child (DZL_MULTI_PANED (self), 0);
if (ret == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]