Small bugfix for null logos.

This commit is contained in:
sigonasr2 2017-09-02 01:27:20 -05:00
parent 35fbfa90e5
commit 72c10519cf
2 changed files with 6 additions and 1 deletions

Binary file not shown.

@ -201,7 +201,12 @@ public class TwitchModule extends Module{
if (!user.getLogo().equalsIgnoreCase("null")) { if (!user.getLogo().equalsIgnoreCase("null")) {
try { try {
org.apache.commons.io.FileUtils.copyURLToFile(new URL(user.getLogo()),new File(userlogo)); org.apache.commons.io.FileUtils.copyURLToFile(new URL(user.getLogo()),new File(userlogo));
followerUserLogo = ImageIO.read(new File(userlogo)); File logo = new File(userlogo);
if (logo.exists()) {
followerUserLogo = ImageIO.read(logo);
} else {
followerUserLogo=null;
}
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {