From 9f1ba14a6895d33e1721a100c29996ed5b5e6d75 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 5 Dec 2010 13:43:26 +0100 Subject: [PATCH] Use default logo for user When no logo with the name of the current user is found, use dummy.bmp. --- winboard/winboard.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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 ); } } } -- 1.7.0.4