vte r2066 - in trunk: . src



Author: chpe
Date: Wed Jun 25 16:51:19 2008
New Revision: 2066
URL: http://svn.gnome.org/viewvc/vte?rev=2066&view=rev

Log:
Bug 540182 â crash in geany with vte trunk
Make sure that match_attributes always exist even if there haven't been any matches added.

Modified:
   trunk/ChangeLog
   trunk/src/vte.c

Modified: trunk/src/vte.c
==============================================================================
--- trunk/src/vte.c	(original)
+++ trunk/src/vte.c	Wed Jun 25 16:51:19 2008
@@ -1484,9 +1484,6 @@
 	if (end != NULL) {
 		*end = 0;
 	}
-	if (terminal->pvt->match_contents == NULL) {
-		vte_terminal_match_contents_refresh(terminal);
-	}
 	/* Map the pointer position to a portion of the string. */
 	eattr = terminal->pvt->match_attributes->len;
 	for (offset = eattr; offset--; ) {
@@ -1711,9 +1708,6 @@
 	if (end != NULL) {
 		*end = 0;
 	}
-	if (terminal->pvt->match_contents == NULL) {
-		vte_terminal_match_contents_refresh(terminal);
-	}
 	/* Map the pointer position to a portion of the string. */
 	eattr = terminal->pvt->match_attributes->len;
 	for (offset = eattr; offset--; ) {
@@ -1912,6 +1906,10 @@
                                   long column, glong row,
                                   int *tag, int *start, int *end)
 {
+	if (terminal->pvt->match_contents == NULL) {
+		vte_terminal_match_contents_refresh(terminal);
+	}
+
         if (terminal->pvt->match_regex_mode == VTE_REGEX_GREGEX)
                 return vte_terminal_match_check_internal_gregex(terminal, column, row, tag, start, end);
         if (terminal->pvt->match_regex_mode == VTE_REGEX_VTE)



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