Fix multi-leg promotions
[xboard.git] / ngamelist.c
index d202ad6..3d2b417 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ngamelist.c -- Game list window, Xt-independent front-end code for XBoard
  *
- * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+ * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc.
  * ------------------------------------------------------------------------
  *
  * GNU XBoard is free software: you can redistribute it and/or modify
@@ -81,7 +81,7 @@ static int GameListPrepare P((int byPos, int narrow));
 static void GameListReplace P((int page));
 static void GL_Button P((int n));
 
-static Option gamesOptions[] = {
+Option gamesOptions[] = {
 { 200,  LR|TB,     400, NULL, (void*) list,       NULL, NULL, ListBox, "", &appData.gameListFont },
 {   0,  0,         100, NULL, (void*) &filterPtr, "", NULL, TextBox, "" },
 {   4,  SAME_ROW,    0, NULL, (void*) &GL_Button, NULL, NULL, Button, N_("find position") },
@@ -223,6 +223,7 @@ GameListReplace (int page)
 void
 GameListUpdate ()
 {
+    if(!DialogExists(GameListDlg)) return;
     GameListPrepare(False, False);
     GameListReplace(0);
 }