RSyntaxTextArea icon indicating copy to clipboard operation
RSyntaxTextArea copied to clipboard

NPE in SyntaxView.viewToModel

Open ovna01 opened this issue 1 year ago • 4 comments

Description In SyntaxView method viewToModel, the call to getTokenListForLine may return null and the following usage of the returned tokenList an NullPointerException. (line 975 and 977).

Steps to Reproduce We have got NPE in some cases, but have no way (yet) to reproduce this.

Expected behavior No NPE

Actual behavior NPE may occur

Java version Java 17

Additional context Possible solution - add a null check before calling tokenList.getListOffset

ovna01 avatar May 07 '24 09:05 ovna01