summaryrefslogtreecommitdiff
path: root/app/wlib/gtklib/ixhelp.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
commite50482f994b6ebcce864a412111d376e99205cdb (patch)
treeff3192c6aaf213c4922521bed988e4ed4147f537 /app/wlib/gtklib/ixhelp.c
parentd3897ce090dbeb220ed2c782f095597e417cf3cc (diff)
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
Update upstream source from tag 'upstream/5.2.0Beta2.1'
Update to upstream version '5.2.0Beta2.1' with Debian dir 1576f25f4c1496abfed44af31ead67d32c7be650
Diffstat (limited to 'app/wlib/gtklib/ixhelp.c')
-rw-r--r--app/wlib/gtklib/ixhelp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/wlib/gtklib/ixhelp.c b/app/wlib/gtklib/ixhelp.c
index f1e3983..5079f61 100644
--- a/app/wlib/gtklib/ixhelp.c
+++ b/app/wlib/gtklib/ixhelp.c
@@ -404,6 +404,13 @@ void wHelp(const char * topic)
{
char *htmlFile;
+ //Take off any topic characters after a '-'
+
+ if (!topic || !topic[0]) return;
+
+
+ if (!CheckHelpTopicExists(topic)) return;
+
if (!wHelpWindow) {
directory = malloc(BUFSIZ);
assert(directory != NULL);
@@ -417,6 +424,7 @@ void wHelp(const char * topic)
/* need space for the 'html' extension plus dot plus \0 */
htmlFile = malloc(strlen(topic) + 6);
+
assert(htmlFile != NULL);
sprintf(htmlFile, "%s.html", topic);
@@ -424,4 +432,6 @@ void wHelp(const char * topic)
load_into_view(htmlFile, MAIN_VIEW);
gtk_widget_show_all(wHelpWindow);
gtk_window_present(GTK_WINDOW(wHelpWindow));
+
+ free(htmlFile);
}