Fixed jira issue and fixed prevent issue
[apps/osp/MusicPlayer.git] / src / MpSettingForm.cpp
index ac5d12d..ac5d139 100644 (file)
@@ -179,6 +179,8 @@ SettingForm::CreateGroupItem(int groupIndex, int itemWidth)
                        if (IsFailed(pGroupTableViewItem->Construct(IDL_SETTING_PLAYLIST_SET_ITEM_PANEL)))
                        {
                                AppLogDebug("Construct(IDL_SETTING_PLAYLIST_SET_ITEM_PANEL) failed(%s)", GetErrorMessage(GetLastResult()));
+                               delete pGroupTableViewItem;
+                               delete pItem;
                                return null;
                        }
                }
@@ -189,6 +191,8 @@ SettingForm::CreateGroupItem(int groupIndex, int itemWidth)
                        if (IsFailed(pGroupTableViewItem->Construct(IDL_SETTING_OFF_SET_ITEM_PANEL)))
                        {
                                AppLogDebug("Construct(IDL_SETTING_PLAYLIST_SET_ITEM_PANEL) failed(%s)", GetErrorMessage(GetLastResult()));
+                               delete pGroupTableViewItem;
+                               delete pItem;
                                return null;
                        }
                        Label* pSubText = static_cast<Label*>(pGroupTableViewItem->GetControl(IDC_LABEL_SUB_TEXT));