Fixing squid:S2259- Null pointers should not be dereferenced.

This commit is contained in:
Faisal Hameed 2016-03-10 15:07:23 +05:00
parent 35e11e43de
commit 1a3aaf86ee
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ public class AudioStream {
// revelas wether two streams are equal
public boolean equals(AudioStream cmp) {
return equalStats(cmp)
return cmp != null && equalStats(cmp)
&& url == cmp.url;
}
}

View File

@ -38,7 +38,7 @@ public class VideoStream {
// revelas wether two streams are equal
public boolean equals(VideoStream cmp) {
return equalStats(cmp)
return cmp != null && equalStats(cmp)
&& url == cmp.url;
}
}

View File

@ -599,7 +599,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
public String getAverageRating() throws ParsingException {
try {
if (playerArgs == null) {
videoInfoPage.get("avg_rating");
return videoInfoPage.get("avg_rating");
}
return playerArgs.getString("avg_rating");
} catch (JSONException e) {