xboard-devel
[Top][All Lists]
Advanced

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

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


From: H.G. Muller
Subject: Re: [XBoard-devel] [PATCH 1/2] Fix segfault with 'Game List Tags' dialogue
Date: Fri, 20 Mar 2015 23:40:34 +0100
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Hi Thomas,

indeed, this was a bug that crept in whith the patch to immediately update the game list after format change, rather than only after the user closed and re-opened it, or applied a new filter. I had already hit upon and fixed it in my own repository on March 4, in a slightly different way
( http://hgm.nubati.net/cgi-bin/gitweb.cgi?p=xboard.git;a=summary ).

As to your previous mail:

Personally I don't care much about standards, and when the compiler eats the code without complaints, I am happy. I was raised with K&R C, and I just adapt my style to the environment where I am patching. It never bothered me that this is different in different places, and would not really know the
difference between C89 and C99 anyway.

If anyone would want to clean up the code a little in that respect I would not mind,
I just would not consider it something worth spending time on myself.
And I am currently a bit behind pushing the latest developments to Savannah.
(They still need to be cleaned up a bit, while I should also check whether they break WinBoard,
before I do that.)
Code cleanups like you propose are likely to cause changes everywhere, which would make it thoroughly impossible to merge all the patches now on hgm.nubati.net into the master branch on Savannah. So we should be a little careful here, and if you really want to work on this, I should bring the Savannah repository up to date as quickly as possible. Otherwise we would fork the development in irreconcilable branches, one cleaned up but obsolete, the other still a mess but fully functional. Unfortunately I have not been able to work as much as I would have liked on XBoard lately, because my wife has broken her leg a few month ago, and is still revalidating. This is why I am
so much behind pushing stuff to Savannah.

Regards,
H.G.



Thomas Adam schreef op 3/20/2015 om 3:42 PM:
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);
  }




reply via email to

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