[PATCH 1/2] Fix segfault with 'Game List Tags' dialogue
Thomas Adam <[email protected]> Fri, 20 Mar 2015 14:42:39 +0000
| Newsgroups | gmane.comp.gnu.xboard.devel |
|---|---|
| Message-ID | <[email protected]> |
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