Skip to content

Commit

Permalink
Fixing crash under BigSur
Browse files Browse the repository at this point in the history
We get a late redraw event in the current 11.X versions, fixes wxWidgets#19030
  • Loading branch information
csomor committed Jan 5, 2021
1 parent b58ee58 commit 86c1fe4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/osx/cocoa/window.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2310,6 +2310,9 @@ When dragging the bottom part of the DND sample ("Drag text from here!")
// Restrict the update region to the shape of the window, if any, and also
// remember the region that we need to clear later.
wxNonOwnedWindow* const tlwParent = wxpeer->MacGetTopLevelWindow();
if ( tlwParent == NULL )
return;

const bool isTopLevel = tlwParent == wxpeer;
wxRegion clearRgn;
if ( tlwParent->GetWindowStyle() & wxFRAME_SHAPED )
Expand Down

0 comments on commit 86c1fe4

Please sign in to comment.