xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XBoard-devel] [PATCH 1/2] Fix segfault with 'Game List Tags' dialogue


From: Thomas Adam
Subject: [XBoard-devel] [PATCH 1/2] Fix segfault with 'Game List Tags' dialogue
Date: Fri, 20 Mar 2015 14:42:39 +0000

If there are no game lists, the Game List Tags dialogue will still try and
operate on data which doesn't exist, resulting in a crash.  Since it's still
useful to manipulate the tags before loading game lists, still allow this, but
don't let XBoard crash as a result.
---
 ngamelist.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ngamelist.c b/ngamelist.c
index d202ad6..9b1b0d7 100644
--- a/ngamelist.c
+++ b/ngamelist.c
@@ -223,6 +223,9 @@ GameListReplace (int page)
 void
 GameListUpdate ()
 {
+    if (glc == NULL)
+        return;
+
     GameListPrepare(False, False);
     GameListReplace(0);
 }
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]