[anjuta] sourceview: Report error when location is > 0 for markers	(bgo#593954)
- From: Johannes Schmid <jhs src gnome org>
 
- To: svn-commits-list gnome org
 
- Cc: 
 
- Subject: [anjuta] sourceview: Report error when location is > 0 for markers	(bgo#593954)
 
- Date: Sat, 12 Sep 2009 14:36:43 +0000 (UTC)
 
commit 37a7fd5e55e88dbaec2e11c8d12938692d00bd1a
Author: Johannes Schmid <jhs gnome org>
Date:   Sat Sep 12 16:36:05 2009 +0200
    sourceview: Report error when location is > 0 for markers (bgo#593954)
 plugins/sourceview/sourceview.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index 66e0a21..53de0a6 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -1696,6 +1696,13 @@ imark_mark(IAnjutaMarkable* mark, gint location, IAnjutaMarkableMarker marker,
 {
 	Sourceview* sv = ANJUTA_SOURCEVIEW(mark);
 	SVMark* svmark = g_slice_new0 (SVMark);
+
+	if (location <= 0)
+	{
+		g_set_error (e, IANJUTA_MARKABLE_ERROR, IANJUTA_MARKABLE_INVALID_LOCATION,
+		             "Invalid marker location: %d!", location);
+		return -1;
+	}
 	
 	static gint marker_count = 0;
 	
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]