[gedit-code-assistance] Check the style scheme is not null before using it



commit dc703d208b37a4b04b487a024e74dc60594efaec
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date:   Sun Feb 3 22:28:46 2013 +0100

    Check the style scheme is not null before using it

 src/gcp-view.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/gcp-view.vala b/src/gcp-view.vala
index f017087..16e0e14 100644
--- a/src/gcp-view.vala
+++ b/src/gcp-view.vala
@@ -204,7 +204,12 @@ class View : Object
 			d_buffer.tag_table.remove(d_semanticTag);
 		}
 
-		GtkSource.Style? style = d_buffer.style_scheme.get_style("search-match");
+		GtkSource.Style? style = null;
+		if (d_buffer.style_scheme != null)
+		{
+			style = d_buffer.style_scheme.get_style("search-match");
+		}
+
 		Gdk.Color bg = {0, 0, 0, 0};
 		Gdk.Color fg = {0, 0, 0, 0};
 



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