From 0237af7e2892c41762a1840869d166684562ce0a Mon Sep 17 00:00:00 2001 From: MicroSteven Date: Tue, 26 May 2020 10:41:21 +0800 Subject: [PATCH] Fix NPL for task.getUrl --- .../com/liulishuo/okdownload/core/download/DownloadCall.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/okdownload/src/main/java/com/liulishuo/okdownload/core/download/DownloadCall.java b/okdownload/src/main/java/com/liulishuo/okdownload/core/download/DownloadCall.java index 779e2c20..0814129a 100644 --- a/okdownload/src/main/java/com/liulishuo/okdownload/core/download/DownloadCall.java +++ b/okdownload/src/main/java/com/liulishuo/okdownload/core/download/DownloadCall.java @@ -145,8 +145,9 @@ public void execute() throws InterruptedException { // inspect task start inspectTaskStart(); do { + // NPL for the task.getUrl() for my release env ! // 0. check basic param before start - if (task.getUrl().length() <= 0) { + if (null == task.getUrl() || task.getUrl().length() <= 0) { this.cache = new DownloadCache.PreError( new IOException("unexpected url: " + task.getUrl())); break;