diff --git a/CHANGELOG.md b/CHANGELOG.md index ac84dbe..923cd59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Fixes - Fixed a stack overflow exception when a panel's children have just enough height to cause a scroll bar to appear - Fixed AddedToUi and RemovedFromUi being called for freshly added or removed children whose parents are not in a ui system - Fixed UiParser ImageExceptionHandler being ignored when an exception occurs during texture construction +- Fixed images displaying the initial texture when the texture callback starts returning null ### MLEM.Data Improvements diff --git a/MLEM.Ui/Elements/Image.cs b/MLEM.Ui/Elements/Image.cs index 59fcf34..033f1e5 100644 --- a/MLEM.Ui/Elements/Image.cs +++ b/MLEM.Ui/Elements/Image.cs @@ -125,7 +125,6 @@ namespace MLEM.Ui.Elements { /// public Image(Anchor anchor, Vector2 size, TextureCallback getTextureCallback, bool scaleToImage = false) : base(anchor, size) { this.GetTextureCallback = getTextureCallback; - this.Texture = getTextureCallback(this); this.ScaleToImage = scaleToImage; this.CanBeSelected = false; this.CanBeMoused = false;