Skip to content

Commit

Permalink
#3436, #3441: Check if server icon image is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Outfluencer committed Mar 15, 2023
1 parent f4534c8 commit 7790783
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/main/java/net/md_5/bungee/api/Favicon.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -59,6 +60,7 @@ public static TypeAdapter<Favicon> getFaviconTypeAdapter()
*/
public static Favicon create(BufferedImage image)
{
Preconditions.checkArgument( image != null, "image is null" );
// check size
if ( image.getWidth() != 64 || image.getHeight() != 64 )
{
Expand Down

0 comments on commit 7790783

Please sign in to comment.