From d5d6d77e981dbe8a514d6b48ced4ed680bad0abf Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 30 May 2017 18:10:03 +0200 Subject: fix crash introduced in 17.77 (mga#20956) Depending on machine speed/slowness, signals will not be fired in the order expected and Repaint() will be called before global variable $cairo is set by draw(). This can be reproduced by making $timer to happens much faster than every 120ms so that it happens before the first call to draw() This workaround fix the bug introduced in commit 1a30f422b41250e338d2c1d209aec1b64204c8e0 But it would probably be saner to get rid of the $cairo global variable and to create a Cairo context in every Repaint() caller instead... --- perl-install/NEWS | 3 +++ perl-install/standalone/drakclock | 1 + 2 files changed, 4 insertions(+) diff --git a/perl-install/NEWS b/perl-install/NEWS index 7da8275d9..67536cff2 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,6 @@ +- drakclock: + o fix crash introduced in 17.77 (mga#20956) + Version 17.82 - 6 May 2017 - drakboot: diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock index 3f4fe2e84..ed0ce940e 100755 --- a/perl-install/standalone/drakclock +++ b/perl-install/standalone/drakclock @@ -250,6 +250,7 @@ sub get_server() { } sub update_time() { my (undef, undef, undef, $mday, $mon, $year) = localtime(time()); + return 1 if !$cairo; $year += 1900; my $old_its_reset = $its_reset; $its_reset = 1; -- cgit v1.2.1