Remove deletes for images from scroll list GUI Elements
Resources are deleted by ~PageSet and do not need to be deleted
by the the scrollable list elements. This fixes a crash when
reloading the theme.
Also remove some deletes for items that should not be deleted in
button and input GUI elements.
Change-Id: Ie1c1b85c81c10f648d085746a5fdba6220468a5f
diff --git a/gui/button.cpp b/gui/button.cpp
index 097bf71..943d719 100644
--- a/gui/button.cpp
+++ b/gui/button.cpp
@@ -130,7 +130,6 @@
if (mButtonImg) delete mButtonImg;
if (mButtonLabel) delete mButtonLabel;
if (mAction) delete mAction;
- if (mButtonIcon) delete mButtonIcon;
}
int GUIButton::Render(void)
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp
index c7805c4..4a26349 100644
--- a/gui/fileselector.cpp
+++ b/gui/fileselector.cpp
@@ -141,8 +141,6 @@
GUIFileSelector::~GUIFileSelector()
{
- delete mFileIcon;
- delete mFolderIcon;
}
int GUIFileSelector::Update(void)
diff --git a/gui/input.cpp b/gui/input.cpp
index bb7bdf8..21b1f0b 100644
--- a/gui/input.cpp
+++ b/gui/input.cpp
@@ -214,8 +214,6 @@
GUIInput::~GUIInput()
{
if (mInputText) delete mInputText;
- if (mBackground) delete mBackground;
- if (mCursor) delete mCursor;
if (mAction) delete mAction;
}
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
index 545b7a2..89a2c03 100644
--- a/gui/listbox.cpp
+++ b/gui/listbox.cpp
@@ -103,8 +103,6 @@
GUIListBox::~GUIListBox()
{
- delete mIconSelected;
- delete mIconUnselected;
}
int GUIListBox::Update(void)
diff --git a/gui/partitionlist.cpp b/gui/partitionlist.cpp
index 48bd295..7e5a74f 100644
--- a/gui/partitionlist.cpp
+++ b/gui/partitionlist.cpp
@@ -96,8 +96,6 @@
GUIPartitionList::~GUIPartitionList()
{
- delete mIconSelected;
- delete mIconUnselected;
}
int GUIPartitionList::Update(void)
diff --git a/gui/scrolllist.cpp b/gui/scrolllist.cpp
index 02656c7..3010d3a 100644
--- a/gui/scrolllist.cpp
+++ b/gui/scrolllist.cpp
@@ -259,9 +259,6 @@
GUIScrollList::~GUIScrollList()
{
- delete mHeaderIcon;
- delete mBackground;
- delete mFont;
}
void GUIScrollList::SetMaxIconSize(int w, int h)