Rosemoe / sora-editor

A multifunctional Android code editor library. (aka CodeEditor)
GNU Lesser General Public License v2.1
967 stars 148 forks source link

Crash when search thread running #566

Closed StarkZhidian closed 6 months ago

StarkZhidian commented 6 months ago

stack trace:


Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
  at io.github.rosemoe.sora.widget.EditorSearcher$SearchRunnable.run (EditorSearcher.java:23)
  at java.lang.Thread.run (Thread.java:1012)
StarkZhidian commented 6 months ago

From stack trace, it like occurred at here: image

Maybe should judge the search status before the search thread actually run?

Rosemoe commented 6 months ago

searchOptions should be changed to options here. I wrote it wrongly.

Rosemoe commented 6 months ago

fix by #568