Fix Background error
[platform/core/csapi/xamarin-forms-extension.git] / Tizen.Xamarin.Forms.Extension.Renderer / BackgroundRenderer.cs
old mode 100755 (executable)
new mode 100644 (file)
index 0a75888..b48ba66
@@ -7,6 +7,7 @@ using EBackgroundOptions = ElmSharp.BackgroundOptions;
 using TForms = Xamarin.Forms.Platform.Tizen.Forms;
 
 [assembly: ExportRenderer(typeof(Background), typeof(BackgroundRenderer))]
+
 namespace Tizen.Xamarin.Forms.Extension.Renderer
 {
     public class BackgroundRenderer : ViewRenderer<Background, EBackground>
@@ -45,7 +46,8 @@ namespace Tizen.Xamarin.Forms.Extension.Renderer
 
         void UpdateImage()
         {
-            Control.File = ResourcePath.GetPath(Element.Image.File);
+            if (Element.Image != null)
+                Control.File = ResourcePath.GetPath(Element.Image.File);
         }
 
         void UpdateOption()
@@ -73,4 +75,4 @@ namespace Tizen.Xamarin.Forms.Extension.Renderer
             }
         }
     }
-}
+}
\ No newline at end of file