xcode 9 runtime checks showed nullptr access here in dialogs sample
This commit is contained in:
@@ -155,7 +155,8 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
// that case, statusbar appearance shouldn't change. It also shouldn't
|
// that case, statusbar appearance shouldn't change. It also shouldn't
|
||||||
// change if a window-modal sheet attached to this window is key.
|
// change if a window-modal sheet attached to this window is key.
|
||||||
wxTopLevelWindow *tlw = wxDynamicCast(MacGetTopLevelWindow(), wxTopLevelWindow);
|
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 )
|
while ( keyWindow && keyWindow != tlw )
|
||||||
{
|
{
|
||||||
wxDialog *dlg = wxDynamicCast(keyWindow, wxDialog);
|
wxDialog *dlg = wxDynamicCast(keyWindow, wxDialog);
|
||||||
|
Reference in New Issue
Block a user