Fixed: Hilighter nullpointer

This commit is contained in:
Jindra Petřík
2025-07-18 18:00:08 +02:00
parent b471b48ba7
commit 311b2376bf
3 changed files with 4 additions and 0 deletions
@@ -52,6 +52,9 @@ public class Markers {
*/
public static void removeMarkers(JTextComponent component, SimpleMarker marker) {
Highlighter hilite = component.getHighlighter();
if (hilite == null) {
return;
}
Highlighter.Highlight[] hilites = hilite.getHighlights();
for (int i = 0; i < hilites.length; i++) {