Check parameters of update_statuslinef()

This commit is contained in:
Stas Degteff 2011-02-22 12:48:13 +00:00
parent dd05817489
commit bc014f0485

View File

@ -145,6 +145,14 @@ void update_statusline(const char* info) {
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") );
return;
}
bool error = false;
char winfobuf[350];
va_list argptr;