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).
https://github.com/wxWidgets/wxWidgets/pull/26238
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@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.![]()
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.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()