[gnumeric] Fix crash on paste into an empty expression entry. [#626648]



commit 0ef1cfc04538475064e9af915a3c1166333e4b1b
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Aug 11 11:27:41 2010 -0600

    Fix crash on paste into an empty expression entry. [#626648]
    
    2010-08-11  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gnumeric-expr-entry.c (gnm_expr_entry_find_range): make sure we lexed
    	  the content.

 NEWS                              |    1 +
 src/widgets/ChangeLog             |    5 +++++
 src/widgets/gnumeric-expr-entry.c |    3 +++
 3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 253a4d3..5df8f98 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Andreas:
 	* Adjust and fix WORKDAY and NETWORKDAY.
 	* Fix crash on certain handcrafted ODF files. [#626632]
 	* Fix import of some ODF 1.0 charts. [#626632]
+	* Fix crash on paste into an empty expression entry. [#626648]
 
 Jean:
 	* Import Guppi graphs from gnumeric-1.0.x files. [#567953]
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 5a1a8b8..fb02cbb 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-11  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* gnumeric-expr-entry.c (gnm_expr_entry_find_range): make sure we lexed
+	  the content.
+
 2010-07-30  Morten Welinder <terra gnome org>
 
 	* Release 1.10.8
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index ff245a0..4f2946f 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -1784,6 +1784,9 @@ gnm_expr_entry_find_range (GnmExprEntry *gee)
 		return TRUE;
 	}
 
+	if (gee->lexer_items == NULL)
+		gee_update_lexer_items (gee);
+
 	gli = gee->lexer_items;
 	while (gli->token != 0 && gli->start < (guint) (ptr - text))
 		gli++;



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