Catch Z-BUS errors in templates.
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 9 May 2015 13:23:18 +0000 (15:23 +0200)
committerArt Cancro <ajc@uncensored.citadel.org>
Tue, 19 May 2015 02:54:57 +0000 (22:54 -0400)
webcit/subst.c

index 586f4f8c646df6b156107b9b25451c2892fed9e0..83540918a1e7c45f9dfadfeb06933561804d3cc8 100644 (file)
@@ -679,6 +679,7 @@ void StrBufAppendTemplate(StrBuf *Target,
        char EscapeAs = ' ';
 
        if ((FormatTypeIndex < TP->Tokens->nParameters) &&
+           (TP->Tokens->Params[FormatTypeIndex] != NULL) &&
            (TP->Tokens->Params[FormatTypeIndex]->Type == TYPE_STR) &&
            (TP->Tokens->Params[FormatTypeIndex]->len >= 1)) {
                pFmt = TP->Tokens->Params[FormatTypeIndex]->Start;