diff options
author | Neil <nyamatongwe@gmail.com> | 2019-09-28 09:38:07 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-09-28 09:38:07 +1000 |
commit | dba67afa3d383e1a7447d8484968e4e6b0252f1e (patch) | |
tree | bc720051685a325a517939f550e3d4cb2d12e8a8 /lexers | |
parent | 4fb4f749d4beec089da677fe3d669f80f0e5db27 (diff) | |
download | scintilla-mirror-dba67afa3d383e1a7447d8484968e4e6b0252f1e.tar.gz |
Bug [#2129]. Fix crash with 'interface=none' comment.
Diffstat (limited to 'lexers')
-rw-r--r-- | lexers/LexMetapost.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lexers/LexMetapost.cxx b/lexers/LexMetapost.cxx index 315a1eab0..7f4e69e59 100644 --- a/lexers/LexMetapost.cxx +++ b/lexers/LexMetapost.cxx @@ -177,7 +177,8 @@ static void ColouriseMETAPOSTDoc( } WordList &keywords = *keywordlists[0] ; - WordList &keywords2 = *keywordlists[extraInterface-1] ; + WordList kwEmpty; + WordList &keywords2 = (extraInterface > 0) ? *keywordlists[extraInterface - 1] : kwEmpty; StyleContext sc(startPos, length, SCE_METAPOST_TEXT, styler) ; |