Use default logo for user
authorH.G. Muller <h.g.muller@hccnet.nl>
Sun, 5 Dec 2010 12:43:26 +0000 (13:43 +0100)
committerArun Persaud <arun@nubati.net>
Sat, 11 Dec 2010 17:41:21 +0000 (09:41 -0800)
When no logo with the name of the current user is found, use dummy.bmp.

winboard/winboard.c

index ad257f9..439df1b 100644 (file)
@@ -884,6 +884,8 @@ SetUserLogo()
            snprintf(oldUserName, MSG_SIZ, "logos\\%s.bmp", curName);\r
                userLogo = LoadImage( 0, oldUserName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );    \r
                safeStrCpy(oldUserName, curName, sizeof(oldUserName)/sizeof(oldUserName[0]) );\r
+               if(userLogo == NULL)\r
+                   userLogo = LoadImage( 0, "logos\\dummy.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE ); \r
          }\r
     }\r
 }\r