[gtksourceview/gtksourcecompletion] Check queue != NULL on dispose.



commit c4878e8a228df9f5353218052ba2216f5dd15c14
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sat Apr 25 01:49:31 2009 +0200

    Check queue != NULL on dispose.
---
 gtksourceview/gtksourcecompletionmodel.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gtksourceview/gtksourcecompletionmodel.c b/gtksourceview/gtksourcecompletionmodel.c
index 284d56a..98b6341 100644
--- a/gtksourceview/gtksourcecompletionmodel.c
+++ b/gtksourceview/gtksourcecompletionmodel.c
@@ -490,8 +490,11 @@ gtk_source_completion_model_dispose (GObject *object)
 	cancel_append (model);
 	cancel_refilter (model);
 	
-	g_queue_free (model->priv->item_queue);
-	model->priv->item_queue = NULL;
+	if (model->priv->item_queue != NULL)
+	{
+		g_queue_free (model->priv->item_queue);
+		model->priv->item_queue = NULL;
+	}
 	
 	if (model->priv->num_per_provider != NULL)
 	{



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