[Attach-panel] Fixed to set the attachPanel after error check
authormoon87.park <moon87.park@samsung.com>
Fri, 14 Jul 2017 05:12:57 +0000 (14:12 +0900)
committermoon87.park <moon87.park@samsung.com>
Fri, 14 Jul 2017 05:12:57 +0000 (14:12 +0900)
Change-Id: If098539a075ebfbc8668edff4c35ba6091027e3e

src/Tizen.Applications.AttachPanel/Tizen.Applications.AttachPanel/AttachPanel.cs

index b74140e..df0415d 100755 (executable)
@@ -20,10 +20,12 @@ namespace Tizen.Applications.AttachPanel
             {
                 throw new ArgumentNullException("Use the value property, not null value");
             }
-            _attachPanel = new IntPtr();
-            Interop.AttachPanel.ErrorCode err = Interop.AttachPanel.CreateAttachPanel(conformant, ref _attachPanel);
+            IntPtr candidateAttachPanel = new IntPtr();
+            Interop.AttachPanel.ErrorCode err = Interop.AttachPanel.CreateAttachPanel(conformant, ref candidateAttachPanel);
             checkException(err);
 
+            _attachPanel = candidateAttachPanel;
+
             if (_eventEventHandler == null)
             {
                 StateEventListenStart();