summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/htmlhelp.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 3d88e4f..d34c8d3 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -161,7 +161,15 @@ void HtmlHelpIndex::addItem(const char *level1,const char *level2,
{
return;
}
- std::string key_anchor = key+anchor;
+ std::string key_anchor;
+ if (anchor)
+ {
+ key_anchor = key+anchor;
+ }
+ else
+ {
+ key_anchor = key;
+ }
m_map.add(key_anchor.c_str(),key.c_str(),url,anchor,hasLink,reversed);
}