Skip to content

Commit

Permalink
xcode 9 runtime checks showed nullptr access here in dialogs sample
Browse files Browse the repository at this point in the history
  • Loading branch information
csomor committed Jun 11, 2017
1 parent 0873b80 commit df898c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/osx/carbon/statbrma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event))
// that case, statusbar appearance shouldn't change. It also shouldn't
// change if a window-modal sheet attached to this window is key.
wxTopLevelWindow *tlw = wxDynamicCast(MacGetTopLevelWindow(), wxTopLevelWindow);
wxWindow *keyWindow = wxNonOwnedWindow::GetFromWXWindow(wxOSXGetKeyWindow())->MacGetTopLevelWindow();
wxNonOwnedWindow* directKeyWindow = wxNonOwnedWindow::GetFromWXWindow(wxOSXGetKeyWindow());
wxWindow *keyWindow = directKeyWindow ? directKeyWindow->MacGetTopLevelWindow() : NULL;
while ( keyWindow && keyWindow != tlw )
{
wxDialog *dlg = wxDynamicCast(keyWindow, wxDialog);
Expand Down

0 comments on commit df898c0

Please sign in to comment.