variables, cp_getvar(), beware of retval == NULL

This commit is contained in:
rlar 2016-08-05 21:21:30 +02:00
parent 20b666e2d5
commit 97c5e1567f
1 changed files with 1 additions and 1 deletions

View File

@ -533,9 +533,9 @@ cp_getvar(char *name, enum cp_types type, void *retval)
}
if (v->va_type == type) {
if (retval)
switch (type) {
case CP_BOOL:
if (retval)
* (bool *) retval = TRUE;
break;
case CP_NUM: {