[longomatch] Make sure to have a Name field



commit 43bc1fff2c10b894e21f89c5c8b7145977c025fb
Author: Jorge Zapata <jorgeluis zapata gmail com>
Date:   Wed Apr 15 18:25:44 2015 +0200

    Make sure to have a Name field

 LongoMatch.Services/FileStorage.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Services/FileStorage.cs b/LongoMatch.Services/FileStorage.cs
index fc63082..471ab6a 100644
--- a/LongoMatch.Services/FileStorage.cs
+++ b/LongoMatch.Services/FileStorage.cs
@@ -163,7 +163,7 @@ namespace LongoMatch.Services.Services
 
                                if (pinfo != null)
                                        pinfo.SetValue (t, Path.GetFileNameWithoutExtension (path));
-                               else
+                               else if (finfo != null)
                                        finfo.SetValue (t, Path.GetFileNameWithoutExtension (path));
 
                                l.Add (t);
@@ -194,7 +194,7 @@ namespace LongoMatch.Services.Services
 
                                        if (pinfo != null)
                                                pinfo.SetValue (t, dict["Name"]);
-                                       else
+                                       else if (finfo != null)
                                                finfo.SetValue (t, dict["Name"]);
 
                                        l.Add (t);


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