#15146 closed defect (fixed)

Crash in the wxComboFrameEventHandler::OnIdle method

Reported by: Mithrandir Owned by:
Priority: high Milestone: 2.9.5
Component: base Version: 2.9.4
Keywords: OnIdle GetParent focus parent null Cc:
Blocked By: Blocking:
Patch: no

Description

The wxComboFrameEventHandler::OnIdle method from the common\combocmn.cpp file gets a pointer to focused window and accesses it without checking.
Situation when application has no focus is normal. Please see the attached screenshot.

wxWindow* winFocused = ::wxWindow::FindFocus();
winFocused->GetParent();

Attachments (1)

wxwidgets_onidle_bug.jpg download (137.8 KB) - added by Mithrandir 20 months ago.

Download all attachments as: .zip

Change History (2)

Changed 20 months ago by Mithrandir

comment:1 Changed 20 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [73809]) Check that focused window is non-NULL before using it in wxComboCtrl.

wxWindow::FindFocus() may return NULL, don't crash by attempting to
dereference the pointer returned by it.

Closes #15146.

Note: See TracTickets for help on using tickets.