aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ini.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ini.c b/src/ini.c
index 42891ef..e98b409 100644
--- a/src/ini.c
+++ b/src/ini.c
@@ -451,6 +451,11 @@ int ini_write(struct INIFILE *ini, FILE **stream, unsigned mode) {
render = parts[p];
}
+ if (!render) {
+ SYSERROR("%s", "rendered string value can never be NULL!\n");
+ return -1;
+ }
+
if (*hint == INIVAL_TYPE_STR_ARRAY) {
int leading_space = isspace(*render);
if (leading_space) {