[longomatch] Ensure the file exists before adding it to the queue



commit fda939f556ce8d78326e542f2da942c76686f784
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Oct 13 14:42:28 2014 +0200

    Ensure the file exists before adding it to the queue

 .../Services/RenderingJobsManager.cs               |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Services/Services/RenderingJobsManager.cs 
b/LongoMatch.Services/Services/RenderingJobsManager.cs
index 2aa51f6..686a724 100644
--- a/LongoMatch.Services/Services/RenderingJobsManager.cs
+++ b/LongoMatch.Services/Services/RenderingJobsManager.cs
@@ -236,6 +236,12 @@ namespace LongoMatch.Services
                        /* FIXME: for now we only support rendering the first angle in the list */
                        file = element.FileSet.GetAngle (element.Angles.FirstOrDefault ());
                        drawings = play.Drawings.Where (d => d.Angle == element.Angles.FirstOrDefault ());
+                       if (file == null || drawings == null) {
+                               return false;
+                       }
+                       if (!file.Exists ()) {
+                               return false;
+                       }
                        foreach (FrameDrawing fd in drawings) {
                                if (fd.Render < play.Start || fd.Render > play.Stop) {
                                        Log.Warning ("Drawing is not in the segments boundaries " +


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]