From: H.G. Muller Date: Sun, 5 Dec 2010 12:43:26 +0000 (+0100) Subject: Use default logo for user X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=9f1ba14a6895d33e1721a100c29996ed5b5e6d75;p=xboard.git Use default logo for user When no logo with the name of the current user is found, use dummy.bmp. --- diff --git a/winboard/winboard.c b/winboard/winboard.c index ad257f9..439df1b 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -884,6 +884,8 @@ SetUserLogo() snprintf(oldUserName, MSG_SIZ, "logos\\%s.bmp", curName); userLogo = LoadImage( 0, oldUserName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE ); safeStrCpy(oldUserName, curName, sizeof(oldUserName)/sizeof(oldUserName[0]) ); + if(userLogo == NULL) + userLogo = LoadImage( 0, "logos\\dummy.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE ); } } }