[longomatch] Fix excaption seting secondsPerPixel when no timers are loaded
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix excaption seting secondsPerPixel when no timers are loaded
- Date: Mon, 7 Jul 2014 11:30:59 +0000 (UTC)
commit fc8429659c2fba8bbb92eb67230cc23053011a54
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Jun 20 14:27:24 2014 +0200
Fix excaption seting secondsPerPixel when no timers are loaded
LongoMatch.Drawing/Widgets/TimersTimeline.cs | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Drawing/Widgets/TimersTimeline.cs b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
index 4a4f688..7923591 100644
--- a/LongoMatch.Drawing/Widgets/TimersTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
@@ -53,7 +53,11 @@ namespace LongoMatch.Drawing.Widgets
}
void Update () {
- double width = duration.Seconds / SecondsPerPixel;
+ double width;
+
+ if (duration == null)
+ return;
+ width = duration.Seconds / SecondsPerPixel;
widget.Width = width + 10;
foreach (TimelineObject tl in timers.Values) {
tl.Width = width + 10;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]