From 7790783949fdb43555634d1eab232b0d6dbb6074 Mon Sep 17 00:00:00 2001 From: Outfluencer <48880402+Outfluencer@users.noreply.github.com> Date: Wed, 15 Mar 2023 08:44:36 +0100 Subject: [PATCH] #3436, #3441: Check if server icon image is null --- api/src/main/java/net/md_5/bungee/api/Favicon.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/main/java/net/md_5/bungee/api/Favicon.java b/api/src/main/java/net/md_5/bungee/api/Favicon.java index 564ca414..2884b5a5 100644 --- a/api/src/main/java/net/md_5/bungee/api/Favicon.java +++ b/api/src/main/java/net/md_5/bungee/api/Favicon.java @@ -1,5 +1,6 @@ package net.md_5.bungee.api; +import com.google.common.base.Preconditions; import com.google.common.io.BaseEncoding; import com.google.gson.TypeAdapter; import com.google.gson.internal.bind.TypeAdapters; @@ -59,6 +60,7 @@ public class Favicon */ public static Favicon create(BufferedImage image) { + Preconditions.checkArgument( image != null, "image is null" ); // check size if ( image.getWidth() != 64 || image.getHeight() != 64 ) {