From: Jordi Albornoz Date: Wed, 8 Jan 2003 15:57:44 +0000 (+0000) Subject: Fix null pointer exception which made gtetrinet crash on connect. Patch from Ian... X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=f84f10d59212a5cfd0cedea1c73a3f77c6db338b;p=gtetrinet Fix null pointer exception which made gtetrinet crash on connect. Patch from Ian Zink. --- diff --git a/ChangeLog b/ChangeLog index f7d6cd6..21a8088 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-01-08 Jordi Mallach + + * NEWS: updated. + * src/dialogs.c (connectingdialog_timeout): apply patch from + Ian Zink , fixes a null pointer exception + which caused a segfault on connect for many people. Thanks! + 2003-01-08 Dani Carbonell * TODO: remove composed characters problem. diff --git a/NEWS b/NEWS index 0403da3..22d47f7 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,12 @@ GTetrinet 0.5.2 - Unreleased +- Fixed segfault on connect dialog many people were seeing. Really. - Fix behaviour of "Ok" button in preferences. It actually works now. - Added intltool support. - Dialogs look nicer now, and are HIG compliant. - Added sanity checks in the connect dialog, in case you include invalid or no nickname, server name or spectator password. - Ignore the shift status, so you can use shift keys as game keys. +- Rewrote fields message input field, so it deals with composed characters. - Code cleanups. GTetrinet 0.5.1 - 2003-01-06 diff --git a/src/dialogs.c b/src/dialogs.c index 1cbfba8..81fc867 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -69,9 +69,10 @@ gint connectingdialog_timeout (void) { GtkAdjustment *adj; adj = GTK_PROGRESS(progressbar)->adjustment; - gtk_progress_set_value (GTK_PROGRESS(progressbar), - (adj->value+1)>adj->upper ? - adj->lower : adj->value+1); + if (adj != NULL) + gtk_progress_set_value (GTK_PROGRESS(progressbar), + (adj->value+1)>adj->upper ? + adj->lower : adj->value+1); return TRUE; }