diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2017-05-30 18:10:03 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2017-05-30 18:16:16 +0200 |
commit | d5d6d77e981dbe8a514d6b48ced4ed680bad0abf (patch) | |
tree | 21483a843b663034aae7133d07442ac5e964a260 /perl-install/standalone/drakclock | |
parent | 26377d87ae81f4cae391ffe5c9dac8723b6643b4 (diff) | |
download | drakx-d5d6d77e981dbe8a514d6b48ced4ed680bad0abf.tar drakx-d5d6d77e981dbe8a514d6b48ced4ed680bad0abf.tar.gz drakx-d5d6d77e981dbe8a514d6b48ced4ed680bad0abf.tar.bz2 drakx-d5d6d77e981dbe8a514d6b48ced4ed680bad0abf.tar.xz drakx-d5d6d77e981dbe8a514d6b48ced4ed680bad0abf.zip |
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...
Diffstat (limited to 'perl-install/standalone/drakclock')
-rwxr-xr-x | perl-install/standalone/drakclock | 1 |
1 files changed, 1 insertions, 0 deletions
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; |