summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-07-03 07:37:19 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-04 21:09:16 -0700
commite391cbd1215569ee7654b1d93153fcd14c2a60a7 (patch)
tree888aa686a4584884562e58655857297045efca08 /src
parent8ef18ed5d0caa2a1bedc76004443a4c30c92c6f0 (diff)
til: optionally finalize in til_module_setup()
This was assuming non-NULL res_setup which would assert in til_module_setup_finalize() which doesn't expect a NULL res_setup since that's its entire purpose. It's not a bug that was actually triggered by any callers (yet)
Diffstat (limited to 'src')
-rw-r--r--src/til.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/til.c b/src/til.c
index fdcce68..c5c5eae 100644
--- a/src/til.c
+++ b/src/til.c
@@ -512,7 +512,10 @@ int til_module_setup(const til_settings_t *settings, til_setting_t **res_setting
if (module->setup)
return module->setup(settings, res_setting, res_desc, res_setup);
- return til_module_setup_finalize(module, settings, res_setup);
+ if (res_setup)
+ return til_module_setup_finalize(module, settings, res_setup);
+
+ return 0;
}
© All Rights Reserved