Don't append NULL when a variable doesn't exist

This caused a glib warning when the following was encountered in
xml2po.pc (and PYTHON_PREFIX wasn't defined):
modesdir=${PYTHON_PREFIX}/lib/python2.7/site-packages/xml2po
This commit is contained in:
Adam Sampson 2022-05-28 17:02:52 +01:00
parent d97db4fae4
commit c16453f955

View file

@ -206,7 +206,8 @@ trim_and_sub (Package *pkg, const char *str, const char *path)
g_free (varname);
g_string_append (subst, varval);
if (varval)
g_string_append (subst, varval);
g_free (varval);
}
else