mirror of https://github.com/adamdruppe/arsd.git
null check to avoid oops
This commit is contained in:
parent
62a1544bda
commit
6560878cd0
|
@ -2897,8 +2897,10 @@ class SimpleWindow : CapableOfHandlingNativeEvent, CapableOfBeingDrawnUpon {
|
||||||
private Image secret_icon_inner;
|
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) {
|
@property void icon(MemoryImage icon) {
|
||||||
|
if(icon is null)
|
||||||
|
return;
|
||||||
auto tci = icon.getAsTrueColorImage();
|
auto tci = icon.getAsTrueColorImage();
|
||||||
version(Windows) {
|
version(Windows) {
|
||||||
winIcon = new WindowsIcon(icon);
|
winIcon = new WindowsIcon(icon);
|
||||||
|
|
Loading…
Reference in New Issue