[anjuta] Fixes NULL pointer dereference when closing tabs.
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] Fixes NULL pointer dereference when closing tabs.
- Date: Sat, 19 Feb 2011 14:07:13 +0000 (UTC)
commit f1a9be8cf937d8d1c0a19e873c990c90b54a0c60
Author: Marco Diego Aurélio Mesquita <marcodiegomesquita gmail com>
Date: Sat Feb 19 10:52:39 2011 -0300
Fixes NULL pointer dereference when closing tabs.
libanjuta/anjuta-tabber.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libanjuta/anjuta-tabber.c b/libanjuta/anjuta-tabber.c
index cde2bf4..531e4a8 100644
--- a/libanjuta/anjuta-tabber.c
+++ b/libanjuta/anjuta-tabber.c
@@ -414,8 +414,11 @@ anjuta_tabber_draw (GtkWidget* widget, cairo_t* cr)
AnjutaTabber* tabber = ANJUTA_TABBER (widget);
GList* child;
GtkWidget* current_tab = g_list_nth_data (tabber->priv->children, tabber->priv->active_page);
- GtkWidget* first = tabber->priv->children->data;
-
+ GtkWidget* first = NULL;
+
+ if (tabber->priv->children)
+ first = tabber->priv->children->data;
+
for (child = tabber->priv->children; child != NULL; child = g_list_next (child))
{
GtkWidget* tab = GTK_WIDGET (child->data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]