From 9b7af294d889c863a8b897425b21898a9e17c6e8 Mon Sep 17 00:00:00 2001 From: Seungkeun Lee Date: Fri, 7 Apr 2017 10:55:14 +0900 Subject: [PATCH] Fix VisualElementRenderer IsDisposed check condition - before true when _flags was exctaly same with VisualElementRendererFlags.Disposed - after true when _flags has a bit flage of VisualElementRendererFlags.Disposed Change-Id: I7491da1188ceeccd786eff4724b8ef702b6f500d --- Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs index d7f7715..73e8c64 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs @@ -116,7 +116,7 @@ namespace Xamarin.Forms.Platform.Tizen } } - protected bool IsDisposed => (_flags == VisualElementRendererFlags.Disposed); + protected bool IsDisposed => _flags.HasFlag(VisualElementRendererFlags.Disposed); /// /// Releases all resource used by the object. @@ -271,7 +271,7 @@ namespace Xamarin.Forms.Platform.Tizen /// True if the memory release was requested on demand. protected virtual void Dispose(bool disposing) { - if ((_flags & VisualElementRendererFlags.Disposed) != 0) + if (IsDisposed) { return; } -- 2.7.4