Sfoglia il codice sorgente

Add missing null check to OutputQueue when changing the enabled state of the queue.

Change-Id: I8e74b3d9a247c289c96cd22736bcc4636f222996
Reviewed-on: http://gerrit.dmdirc.com/2839
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.8
Shane Mc Cormack 10 anni fa
parent
commit
53058f9df3
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4
    2
      src/com/dmdirc/parser/irc/outputqueue/OutputQueue.java

+ 4
- 2
src/com/dmdirc/parser/irc/outputqueue/OutputQueue.java Vedi File

@@ -113,8 +113,10 @@ public class OutputQueue {
113 113
 
114 114
         if (old != queueEnabled && old) {
115 115
             synchronized (queueHandlerLock) {
116
-                queueHandler.interrupt();
117
-                queueHandler = null;
116
+                if (queueHandler != null) {
117
+                    queueHandler.interrupt();
118
+                    queueHandler = null;
119
+                }
118 120
             }
119 121
 
120 122
             while (!queue.isEmpty()) {

Loading…
Annulla
Salva