Skip to content

Commit

Permalink
Merge pull request #2678 from cwensley/curtis/mac-fix-sizechanged-on-…
Browse files Browse the repository at this point in the history
…disposed

Mac: Don't call SizeChanged if disposed
  • Loading branch information
cwensley authored Aug 29, 2024
2 parents acc5d2b + 9214450 commit 6f09666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Eto.Mac/Forms/MacView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static void SetFrameSizeAction(IntPtr sender, IntPtr sel, CGSize size)
var obj = Runtime.GetNSObject(sender);
Messaging.void_objc_msgSendSuper_SizeF(obj.SuperHandle, sel, size);

if (MacBase.GetHandler(obj) is IMacViewHandler handler)
if (MacBase.GetHandler(obj) is IMacViewHandler handler && !handler.Widget.IsDisposed)
{
handler.OnSizeChanged(EventArgs.Empty);
handler.Callback.OnSizeChanged(handler.Widget, EventArgs.Empty);
Expand Down

0 comments on commit 6f09666

Please sign in to comment.