Fix Crash issue - Maximum string inputed
authorHyukSoon Choi <hs619.choi@samsung.com>
Mon, 8 Apr 2013 01:13:10 +0000 (10:13 +0900)
committerHyukSoon Choi <hs619.choi@samsung.com>
Mon, 8 Apr 2013 01:13:10 +0000 (10:13 +0900)
Change-Id: I10c59417d9a2402d9f2958c4e9c0f4a76688d806
Signed-off-by: HyukSoon Choi <hs619.choi@samsung.com>
src/IvImageNameEditorForm.cpp

index 25803bd..77383be 100644 (file)
@@ -331,33 +331,20 @@ ImageNameEditorForm::OnSceneDeactivated(const SceneId& currentSceneId,
 void
 ImageNameEditorForm::CreateMessage(String& str)
 {
-       if (__pMessageBox != null)
-       {
-               delete __pMessageBox;
-               __pMessageBox = null;
-               __modalMsgBoxResult = 0;
-       }
-
-       __pMessageBox = new(std::nothrow) MessageBox;
-
-       if (__pMessageBox != null)
+       if (__pMessageBox == null)
        {
-               __pMessageBox->Construct(L"", str, MSGBOX_STYLE_OK, 3000);
-       }
-
-       if (__pMessageBox != null)
-       {
-               __pMessageBox->ShowAndWait(__modalMsgBoxResult);
+               __pMessageBox = new(std::nothrow) MessageBox;
 
                if (__pMessageBox != null)
                {
+                       __pMessageBox->Construct(L"", str, MSGBOX_STYLE_OK, 3000);
+                       __pMessageBox->ShowAndWait(__modalMsgBoxResult);
+
                        delete __pMessageBox;
                        __pMessageBox = null;
+                       __modalMsgBoxResult = 0;
                }
-               __modalMsgBoxResult = 0;
        }
-
-       return;
 }
 
 void