Skip to content

Commit 4732782

Browse files
committed
Potential crash fix
1 parent 3cd1d03 commit 4732782

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/quantumbadger/redreader/cache/CacheDownload.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ public synchronized void cancel() {
7474
new Thread() {
7575
@Override
7676
public void run() {
77-
mRequest.cancel();
78-
mInitiator.notifyFailure(CacheRequest.REQUEST_FAILURE_CANCELLED, null, null, "Cancelled");
77+
if(mRequest != null) {
78+
mRequest.cancel();
79+
mInitiator.notifyFailure(CacheRequest.REQUEST_FAILURE_CANCELLED, null, null, "Cancelled");
80+
}
7981
}
8082
}.start();
8183
}

0 commit comments

Comments
 (0)