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 | 6de3dee515fa58510c9c0c64ed75a209a79a9dcf (patch) | |
| tree | da7daf0c09eb1f797c6fa20a7ac655488a33b382 /lexers/LexMetapost.cxx | |
| parent | fb05a198c8dea8ae8d7c0e2ad08078c796dbfada (diff) | |
| download | scintilla-mirror-6de3dee515fa58510c9c0c64ed75a209a79a9dcf.tar.gz | |
Backport: Bug [#2129]. Fix crash with 'interface=none' comment.
Backport of changeset 7692:88e3b32fc9c0.
Diffstat (limited to 'lexers/LexMetapost.cxx')
| -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) ; |
