From a98a889d21403be8361c2abdd41480d5d02674cd Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 13 Apr 2011 11:41:54 +0200 Subject: [PATCH] Fix crash copying game list when there is none --- xgamelist.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xgamelist.c b/xgamelist.c index d2cf8bd..8839e90 100644 --- a/xgamelist.c +++ b/xgamelist.c @@ -623,7 +623,7 @@ int SaveGameListAsText(FILE *f) ListGame * lg = (ListGame *) gameList.head; int nItem; - if( ((ListGame *) gameList.tailPred)->number <= 0 ) { + if( !glc || ((ListGame *) gameList.tailPred)->number <= 0 ) { DisplayError("Game list not loaded or empty", 0); return False; } -- 1.7.0.4