mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 707929 - java.lang.NullPointerException @ ZipFile.getInputStream(ZipFile.java:256) r=mfinke a=java-only
This commit is contained in:
parent
2f3f240182
commit
5b90c3df97
@ -236,7 +236,11 @@ public class AboutHomeContent extends ScrollView {
|
||||
return is;
|
||||
File applicationPackage = new File(activity.getApplication().getPackageResourcePath());
|
||||
ZipFile zip = new ZipFile(applicationPackage);
|
||||
if (zip == null)
|
||||
return null;
|
||||
ZipEntry fileEntry = zip.getEntry("recommended-addons.json");
|
||||
if (fileEntry == null)
|
||||
return null;
|
||||
return zip.getInputStream(fileEntry);
|
||||
}
|
||||
|
||||
@ -246,6 +250,8 @@ public class AboutHomeContent extends ScrollView {
|
||||
try {
|
||||
byte[] buf = new byte[32768];
|
||||
InputStream fileStream = getRecommendedAddonsStream(activity);
|
||||
if (fileStream == null)
|
||||
return;
|
||||
StringBuffer jsonString = new StringBuffer();
|
||||
int read = 0;
|
||||
while ((read = fileStream.read(buf, 0, 32768)) != -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user