Skip to content

Commit

Permalink
Merge pull request #35 from joelwr/master
Browse files Browse the repository at this point in the history
Fix NPE on shutdown in gnome
  • Loading branch information
Dansoftowner authored Apr 10, 2024
2 parents 61d9025 + f1ceb12 commit b61cc36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/jthemedetecor/GnomeThemeDetector.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ public void run() {
while (!this.isInterrupted()) {
//Expected input = gtk-theme: '$GtkThemeName'
String readLine = reader.readLine();

// reader.readLine sometimes returns null on application shutdown.
if (readLine == null) {
continue;
}

if (!outputPattern.matcher(readLine).matches()) {
continue;
}
Expand Down

0 comments on commit b61cc36

Please # to comment.