f-spot r4635 - in trunk: . src/Core
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4635 - in trunk: . src/Core
- Date: Wed, 26 Nov 2008 14:13:24 +0000 (UTC)
Author: sdelcroix
Date: Wed Nov 26 14:13:24 2008
New Revision: 4635
URL: http://svn.gnome.org/viewvc/f-spot?rev=4635&view=rev
Log:
protect the event against race conditions
2008-11-26 Stephane Delcroix <sdelcroix novell com>
* src/Core/Animator.cs: protect the event against null or race conditions
Modified:
trunk/ChangeLog
trunk/src/Core/Animator.cs
Modified: trunk/src/Core/Animator.cs
==============================================================================
--- trunk/src/Core/Animator.cs (original)
+++ trunk/src/Core/Animator.cs Wed Nov 26 14:13:24 2008
@@ -49,8 +49,9 @@
public bool HandleTimeout ()
{
percent = (DateTime.Now - start).Ticks / (float) duration.Ticks;
- if (tick != null)
- tick (this, EventArgs.Empty);
+ EventHandler tick_handler = tick;
+ if (tick_handler != null)
+ tick_handler (this, EventArgs.Empty);
return delay.IsPending;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]