/[EmuXPortal]/trunk/EmuXPortal/Api/RomConfig.cs
ViewVC logotype

Diff of /trunk/EmuXPortal/Api/RomConfig.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/EmuXPortal/Api/RomConfig.cs	2012/08/22 02:36:47	105
+++ trunk/EmuXPortal/Api/RomConfig.cs	2012/08/22 02:47:38	106
@@ -38,7 +38,21 @@
                 if (File.Exists(string.Format("{0}.jpg", fi.FullName.Replace(fi.Extension, "")))) { rom_img = string.Format("{0}.jpg", fi.FullName.Replace(fi.Extension, "")); }
                 try
                 {
-                    this.RomImage = (rom_img == "") ? Properties.Resources.DefaultGameImage : Image.FromFile(rom_img);
+                    if (rom_img != string.Empty)
+                    {
+                        try
+                        {
+                            this.RomImage = Image.FromFile(rom_img);
+                        }
+                        catch (Exception ex)
+                        {
+                            throw ex;
+                        }
+                    }
+                    else
+                    {
+                        this.RomImage = Properties.Resources.DefaultGameImage;
+                    }
                 }
                 catch (Exception ex)
                 {

 

  ViewVC Help
Powered by ViewVC 1.1.22