Avoid restore download null

This commit is contained in:
seven332 committed 2016-05-30 00:20:04 +08:00
1 parent b4fc856a51
commit b52f260c9e
2 files changed
+4

No files matched your search

@@ -90,6 +90,9 @@ public class RestoreDownloadPreference extends TaskPreference {
try {
is = siFile.openInputStream();
SpiderInfo spiderInfo = SpiderInfo.read(is);
if (spiderInfo == null) {
return null;
}
long gid = spiderInfo.gid;
if (mManager.containDownloadInfo(gid)) {
return null;
@@ -94,6 +94,7 @@ public class SpiderInfo {
}
}
@Nullable
@SuppressWarnings("InfiniteLoopStatement")
public static SpiderInfo read(@Nullable InputStream is) {
if (null == is) {