Add check for config like in wxHtmlHelpController::ReadCustomization (PR #26238)

18 views
Skip to first unread message

mcorino

unread,
Feb 24, 2026, 4:21:21 AM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed

This way the used config can be safely reset to nullptr as clearly the intention looking at wxHtmlHelpController.

Currently a segfault occurs when calling wxHtmlHelpController::UseConfig(nullptr) (or wxHtmlHelpWindow::UseConfig(nullptr) directly).


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26238

Commit Summary

  • a237a81 Add check for config like in wxHtmlHelpController::ReadCustomization

File Changes

(1 file)

Patch Links:


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/pull/26238@github.com>

mcorino

unread,
Feb 24, 2026, 5:29:04 AM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed
mcorino left a comment (wxWidgets/wxWidgets#26238)

@vadz It would be nice if this could still be included in 3.3.2 as this causing me grieve in wxRuby3 regression tests for the Wx::ConfigBase classes. A 'normal' app would probably not muck about with settings / resetting the global configuration instance and mixing that with HtmlHelpController tests etc. but the tests do and the API allows it so it would seem prudent to be able to guard against that. Unfortunately the only option currently to protect the HtmlHelpController against having a reference to an non-existing configuration instance at the moment it is destroyed (when it will attempt to save it's custom config) is to explicitly reset it's config instance to nullptr if not for the problem with HtmlHelpWindow.


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/pull/26238/c3950678343@github.com>

VZ

unread,
Feb 24, 2026, 10:47:23 AM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26238)

This looks safe to apply, so I'll do it soon, thanks.

I'll also update the docs to explicitly mention that nullptr can be passed here, although I'm not quite sure about the implications: the docs for the same member function in wxHtmlHelpController say

        If you do not use UseConfig(), wxHtmlHelpController will use the default
        wxConfig object if available (for details see wxConfigBase::Get and
        wxConfigBase::Set).

but here it looks like the use of config is completely disabled instead?


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/pull/26238/c3953043987@github.com>

VZ

unread,
Feb 24, 2026, 10:53:48 AM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed

Closed #26238 via d040578.


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/pull/26238/issue_event/23039752688@github.com>

mcorino

unread,
Feb 24, 2026, 12:30:31 PM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed
mcorino left a comment (wxWidgets/wxWidgets#26238)
If UseConfig is called with nullptr after the help windows have been created by the controller the effect will indeed be that config use is disabled.On 24 Feb 2026 16:47, VZ ***@***.***> wrote:vadz left a comment (wxWidgets/wxWidgets#26238)

This looks safe to apply, so I'll do it soon, thanks.
I'll also update the docs to explicitly mention that nullptr can be passed here, although I'm not quite sure about the implications: the docs for the same member function in wxHtmlHelpController say
If you do not use UseConfig(), wxHtmlHelpController will use the default
wxConfig object if available (for details see wxConfigBase::Get and
wxConfigBase::Set).

but here it looks like the use of config is completely disabled instead?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>


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/pull/26238/c3953646351@github.com>

Reply all
Reply to author
Forward
0 new messages