[longomatch] Fix MediaFileSet Preview getter
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix MediaFileSet Preview getter
- Date: Wed, 18 Mar 2015 14:34:54 +0000 (UTC)
commit 07740ab5dff59007e9560e8c53fb352d4e7bf637
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Mar 2 17:54:23 2015 +0100
Fix MediaFileSet Preview getter
LongoMatch.Core/Store/MediaFileSet.cs | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Core/Store/MediaFileSet.cs b/LongoMatch.Core/Store/MediaFileSet.cs
index 7e55c35..31773eb 100644
--- a/LongoMatch.Core/Store/MediaFileSet.cs
+++ b/LongoMatch.Core/Store/MediaFileSet.cs
@@ -45,7 +45,11 @@ namespace LongoMatch.Core.Store
public Image Preview {
get {
- return Files[MediaFileAngle.Angle1].Preview;
+ if (Files.Count == 0) {
+ return null;
+ } else {
+ return Files[MediaFileAngle.Angle1].Preview;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]