# HG changeset patch # User Michiel Broek # Date 1404766319 -7200 # Node ID d08bf980ff280c41168ef153d9a1fec5efab6654 # Parent 2c28afc329a575c6d5b01a705f521622b4559594 Fixed NULL writing diff -r 2c28afc329a5 -r d08bf980ff28 thermferm/rdconfig.c --- a/thermferm/rdconfig.c Mon Jul 07 22:31:07 2014 +0200 +++ b/thermferm/rdconfig.c Mon Jul 07 22:51:59 2014 +0200 @@ -173,7 +173,7 @@ syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); return 1; } - if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_ADDRESS", "%s", Config.air_address)) < 0) { + if (Config.air_address && (rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_ADDRESS", "%s", Config.air_address)) < 0) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); return 1; }