X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=e31f184128e19180c407d08de71203cd49fac73f;hb=14005df069bf869fc3185ebb19b3460aa041f1bc;hp=feda2cafed26617fdd47c365f644b2249c9d43ea;hpb=3b33cbae38e5384a728931bc614dd51942a5f7cf;p=xboard.git diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index feda2ca..e31f184 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -48,16 +48,8 @@ static BOOLEAN gameListUp = FALSE; static FILE* gameFile; static char* gameFileName = NULL; -struct GameListStats -{ - int white_wins; - int black_wins; - int drawn; - int unfinished; -}; - /* [AS] Setup the game list according to the specified filter */ -static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats, BOOL byPos, BOOL narrow ) +int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats, BOOL byPos, BOOL narrow ) { ListGame * lg = (ListGame *) gameList.head; int nItem; @@ -66,6 +58,9 @@ static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct int count = 0; struct GameListStats dummy; + if(!hDlg) hDlg = gameListDialog; // [HGM] to allow calling from Game List Options dialog + if(!hDlg) return 0; + /* Initialize stats (use a dummy variable if caller not interested in them) */ if( stats == NULL ) { stats = &dummy;