Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Fix some unfriendly behavior in Favicon#create(Path)
Dieser Commit ist enthalten in:
Ursprung
2d54a2c15b
Commit
e979db7778
@ -93,7 +93,11 @@ public final class Favicon {
|
||||
*/
|
||||
public static Favicon create(Path path) throws IOException {
|
||||
try (InputStream stream = Files.newInputStream(path)) {
|
||||
return create(ImageIO.read(stream));
|
||||
BufferedImage image = ImageIO.read(stream);
|
||||
if (image == null) {
|
||||
throw new IOException("Unable to read the image.");
|
||||
}
|
||||
return create(image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren