[longomatch] Fix segfault in coordinates migration



commit b9b8fe7795ff93848e03818a44630cc60b0c2484
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Jan 18 15:42:48 2014 +0100

    Fix segfault in coordinates migration

 LongoMatch.Services/Services/DataBase.cs |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Services/Services/DataBase.cs b/LongoMatch.Services/Services/DataBase.cs
index 0f9ab93..e071b4e 100644
--- a/LongoMatch.Services/Services/DataBase.cs
+++ b/LongoMatch.Services/Services/DataBase.cs
@@ -513,6 +513,8 @@ namespace LongoMatch.DB
                                new_width = image.Width;
                                foreach (Coordinates c in coords) {
                                        float scale = (float) new_width / old_width;
+                                       if (c == null)
+                                               continue;
                                        foreach (Point p in c) {
                                                p.X = (int) (p.X * scale);
                                                p.Y = (int) (p.Y * scale);


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