diff --git a/simpledisplay.d b/simpledisplay.d index 5da96dd..c9eff53 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -2897,8 +2897,10 @@ class SimpleWindow : CapableOfHandlingNativeEvent, CapableOfBeingDrawnUpon { private Image secret_icon_inner; - /// Set the icon that is seen in the title bar or taskbar, etc., for the user. + /// Set the icon that is seen in the title bar or taskbar, etc., for the user. If passed `null`, does nothing. @property void icon(MemoryImage icon) { + if(icon is null) + return; auto tci = icon.getAsTrueColorImage(); version(Windows) { winIcon = new WindowsIcon(icon);