warning: this crashes (on linux)

This commit is contained in:
Frakits
2025-08-06 23:15:53 +03:00
parent e89c0411c6
commit 6a1bbb72e3
4 changed files with 53 additions and 3 deletions
+3 -1
View File
@@ -63,7 +63,9 @@ final class WindowUtils {
* @param image The image to set as the icon.
**/
public static inline function setWindow(?name:String, ?image:String)
{ Lib.application.window.setIcon(lime.graphics.Image.fromBytes(Assets.getBytes(image != null ? image : Flags.MOD_ICON)));
{
if (Flags.MOD_ICON == null && image == null) return;
Lib.application.window.setIcon(lime.graphics.Image.fromBytes(Assets.getBytes(Paths.image(image != null ? image : Flags.MOD_ICON))));
title = name != null ? name : Flags.MOD_NAME;
}