Add support for ad-hoc response with forms

This commit is contained in:
Paul Fariello
2018-09-10 12:28:28 +02:00
parent b7556b4e41
commit 6de60e7efc
2 changed files with 8 additions and 2 deletions

View File

@@ -3899,11 +3899,11 @@ cmd_form(ProfWin *window, const char *const command, gchar **args)
return TRUE;
}
if (g_strcmp0(args[0], "submit") == 0) {
if (g_strcmp0(args[0], "submit") == 0 && confwin->submit != NULL) {
confwin->submit(confwin);
}
if (g_strcmp0(args[0], "cancel") == 0) {
if (g_strcmp0(args[0], "cancel") == 0 && confwin->cancel != NULL) {
confwin->cancel(confwin);
}