[gedit] Fix a possible NULL deref
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Fix a possible NULL deref
- Date: Thu, 7 Jun 2012 11:26:50 +0000 (UTC)
commit f62cbfda7052587eae0136f0487213df7f9f3489
Author: Garrett Regier <garrettregier gmail com>
Date: Thu Jun 7 04:23:41 2012 -0700
Fix a possible NULL deref
gedit/gedit-multi-notebook.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gedit/gedit-multi-notebook.c b/gedit/gedit-multi-notebook.c
index 55a172e..79d2f0b 100644
--- a/gedit/gedit-multi-notebook.c
+++ b/gedit/gedit-multi-notebook.c
@@ -700,9 +700,6 @@ gedit_multi_notebook_set_current_page (GeditMultiNotebook *mnb,
g_return_if_fail (GEDIT_IS_MULTI_NOTEBOOK (mnb));
- if (mnb->priv->notebooks == NULL)
- return;
-
for (l = mnb->priv->notebooks; l != NULL; l = g_list_next (l))
{
gint p;
@@ -716,6 +713,9 @@ gedit_multi_notebook_set_current_page (GeditMultiNotebook *mnb,
single_num -= p;
}
+ if (l == NULL)
+ return;
+
if (GTK_WIDGET (l->data) != mnb->priv->active_notebook)
{
gtk_widget_grab_focus (GTK_WIDGET (l->data));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]