[gtksourceview] GtkSourceMarkCategory: check the pointer before dereferencing it.



commit 4ef3beb72dfc1afc83cbc50a2bd61567e5c0335f
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Mon Dec 20 22:27:21 2010 +0100

    GtkSourceMarkCategory: check the pointer before dereferencing it.

 gtksourceview/gtksourcemarkcategory.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/gtksourcemarkcategory.c b/gtksourceview/gtksourcemarkcategory.c
index 044a21d..3996805 100644
--- a/gtksourceview/gtksourcemarkcategory.c
+++ b/gtksourceview/gtksourcemarkcategory.c
@@ -378,7 +378,10 @@ gtk_source_mark_category_get_background (GtkSourceMarkCategory *category,
 {
 	g_return_val_if_fail (GTK_IS_SOURCE_MARK_CATEGORY (category), FALSE);
 
-	*background = category->priv->background;
+	if (background)
+	{
+		*background = category->priv->background;
+	}
 	return category->priv->background_set;
 }
 



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