From f84f10d59212a5cfd0cedea1c73a3f77c6db338b Mon Sep 17 00:00:00 2001 From: Jordi Albornoz Date: Wed, 8 Jan 2003 15:57:44 +0000 Subject: [PATCH] Fix null pointer exception which made gtetrinet crash on connect. Patch from Ian Zink. --- ChangeLog | 7 +++++++ NEWS | 2 ++ src/dialogs.c | 7 ++++--- 3 files changed, 13 insertions(+), 3 deletions(-) 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; } -- 2.50.1