Memory sat to zero by calloc() cannot safely be assumed to have the pointer value NULL
if (glc == NULL) {
glc = (GameListClosure *) calloc(1, sizeof(GameListClosure));
glc->x = glc->y = -1;
+ glc->filename = NULL;
+ glc->shell = NULL;
}
GameListPrepare(False); // [HGM] filter: code put in separate routine
if (glc->filename != NULL) free(glc->filename);
glc->filename = StrSave(filename);
-
if (glc->shell == NULL) {
glc->shell = GameListCreate(filename, GameListCallback, glc);
} else {