Write message into log and statusline if parameter of update_statuslinef() is invalid

This commit is contained in:
Stas Degteff 2011-02-22 12:55:06 +00:00
parent bc014f0485
commit 848b7129c2

View File

@ -148,8 +148,9 @@ void update_statuslinef(const char *format, const char *token, ...)
if ( !(format && *format && token && *token) )
{
LOG.errpointer(__FILE__, __LINE__);
LOG.printf( "! Parameter is NULL pointer or empty string: update_statuslinef(%s,%s,...).",
(format?(*format)?"format":"\"\"":"NULL"), (token?(*token)?"token":"\"\"":"NULL") );
LOG.printf( "! Parameter is NULL pointer or empty string: update_statuslinef(\"%s\",\"%s\",...).",
(format?(*format)?format:"":"(NULL)"), (token?(*token)?token:"":"(NULL)") );
update_statusline(" ERROR! Please look a log file and make a report to developers! ");
return;
}