diff options
Diffstat (limited to 'services/java/com/android/server/print/RemotePrintService.java')
-rw-r--r-- | services/java/com/android/server/print/RemotePrintService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/java/com/android/server/print/RemotePrintService.java b/services/java/com/android/server/print/RemotePrintService.java index 0d539b0..f15c760 100644 --- a/services/java/com/android/server/print/RemotePrintService.java +++ b/services/java/com/android/server/print/RemotePrintService.java @@ -447,7 +447,9 @@ final class RemotePrintService implements DeathRecipient { Slog.i(LOG_TAG, "[user: " + mUserId + "] stopPrinterTracking()"); } // We are no longer tracking the printer. - mTrackedPrinterList.remove(printerId); + if (mTrackedPrinterList == null || !mTrackedPrinterList.remove(printerId)) { + return; + } if (mTrackedPrinterList.isEmpty()) { mTrackedPrinterList = null; } |