Add a debug check for HTML tag handlers being available.
This helps to detect the situation when HTML tag handlers are not linked in at all, as it can happen with MSVC when using static libraries, as this doesn't prevent wxHTML from parsing HTML, it just doesn't render it correctly at all and it can be difficult to understand why exactly does this happen, so try to detect this situation and provide a hint.
This commit is contained in:
@@ -316,6 +316,13 @@ void wxHtmlParser::AddTag(const wxHtmlTag& tag)
|
||||
if (m_stopParsing)
|
||||
return;
|
||||
}
|
||||
#if wxDEBUG_LEVEL
|
||||
else if (m_HandlersHash.empty())
|
||||
{
|
||||
wxFAIL_MSG( "No HTML tag handlers registered, is your program linked "
|
||||
"correctly (you might need to use FORCE_WXHTML_MODULES)?" );
|
||||
}
|
||||
#endif // wxDEBUG_LEVEL
|
||||
if (!inner)
|
||||
{
|
||||
if (tag.HasEnding())
|
||||
|
Reference in New Issue
Block a user