diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/FormsLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/FormsLuaLibrary.cs index f3ce74a9f1..54af9dcab7 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/FormsLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/FormsLuaLibrary.cs @@ -677,6 +677,11 @@ namespace BizHawk.Client.EmuHawk "draws an Icon (.ico) file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly")] public void DrawIcon(int componentHandle, string path, int x, int y, int? width = null, int? height = null) { + if (!File.Exists(path)) + { + LogOutputCallback($"File not found: {path}\nScript Terminated"); + return; + } try { var ptr = new IntPtr(componentHandle);