avoid division by zero when no calendar is configured

This commit is contained in:
Enno Rehling 2017-02-07 10:39:54 +01:00
parent e69a7f0063
commit e5c95f1501
1 changed files with 0 additions and 1 deletions

View File

@ -361,7 +361,6 @@ static int parse_calendar(xmlDocPtr doc)
xpathCalendars = xmlXPathEvalExpression(BAD_CAST "/eressea/calendar", xpath); xpathCalendars = xmlXPathEvalExpression(BAD_CAST "/eressea/calendar", xpath);
nsetCalendars = xpathCalendars->nodesetval; nsetCalendars = xpathCalendars->nodesetval;
months_per_year = 0;
if (nsetCalendars != NULL && nsetCalendars->nodeNr != 0) { if (nsetCalendars != NULL && nsetCalendars->nodeNr != 0) {
int c; int c;
for (c = 0; c != nsetCalendars->nodeNr; ++c) { for (c = 0; c != nsetCalendars->nodeNr; ++c) {