wxAcceleratorTable constructor called with a count of zero triggers debug assert on MSW (Issue #25517)

21 views
Skip to first unread message

rkissg

unread,
Jun 12, 2025, 2:37:52 PM6/12/25
to wx-...@googlegroups.com, Subscribed
rkissg created an issue (wxWidgets/wxWidgets#25517)

The code

wxAcceleratorTable table(0, entries);

triggers a debug assertion at runtime when compiled with MSVC in Debug mode.

The culprit seems to be 4cc13e1. Replacing the &arr[0] with arr.data() should solve this.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25517@github.com>

VZ

unread,
Jun 12, 2025, 3:12:27 PM6/12/25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25517)

Thanks for reporting this. I wonder if we should call CreateAcceleratorTable() at all in this case (when n == 0), does it return a valid HACCEL in this case?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25517/2967886293@github.com>

VZ

unread,
Jun 22, 2025, 2:51:30 PM6/22/25
to wx-...@googlegroups.com, Subscribed

Closed #25517 as completed via 750b2a4.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/25517/issue_event/18262264014@github.com>

Reply all
Reply to author
Forward
0 new messages