changeset 16756:d56cbc17566e

avoid looking at previous token that doesn't exist (bug #39180) * lex.ll (lexical_feedback::maybe_mark_previous_token_as_variable): Check that tok is not null.
author John W. Eaton <jwe@octave.org>
date Wed, 12 Jun 2013 11:19:53 -0400
parents 787168f5f858
children 35d9f1f79f06
files libinterp/parse-tree/lex.ll
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll	Wed Jun 12 10:50:29 2013 -0400
+++ b/libinterp/parse-tree/lex.ll	Wed Jun 12 11:19:53 2013 -0400
@@ -1629,7 +1629,8 @@
 lexical_feedback::maybe_mark_previous_token_as_variable (void)
 {
   token *tok = tokens.front ();
-  if (tok->is_symbol ())
+
+  if (tok && tok->is_symbol ())
     pending_local_variables.insert (tok->symbol_name ());
 }