summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangpyo Kim <sangpyo7.kim@samsung.com>2012-09-03 23:02:14 +0900
committerSangpyo Kim <sangpyo7.kim@samsung.com>2012-09-03 23:12:37 +0900
commit7465c5cabbb87b17833fc103d79d15e6ad000ee8 (patch)
tree09ffd2214850fbd2c8cdbbb16168a6d2f914405c
parent7bba499346e01c4708af28285f10919efa3217dd (diff)
downloadbrowser-7465c5cabbb87b17833fc103d79d15e6ad000ee8.tar.gz
browser-7465c5cabbb87b17833fc103d79d15e6ad000ee8.tar.bz2
browser-7465c5cabbb87b17833fc103d79d15e6ad000ee8.zip
[Title] immediately erasing bookmark list item after it is deleted.
[Issue#] N_SE-8788 [Problem] crash occured when get a label on the bookmark genlist [Cause] The item memory address is accessed after it is deleted [Solution] immediately erasing bookmark list item after it is deleted. [Team] Browser UI [Developer] sangpyo7.kim [Request] N/A Change-Id: Ic209b9482842a87fa01cdaef61738283f4c02005
-rwxr-xr-xsrc/browser-bookmark/browser-bookmark-view.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/browser-bookmark/browser-bookmark-view.cpp b/src/browser-bookmark/browser-bookmark-view.cpp
index 30a522b3..b5265d7d 100755
--- a/src/browser-bookmark/browser-bookmark-view.cpp
+++ b/src/browser-bookmark/browser-bookmark-view.cpp
@@ -71,14 +71,18 @@ Browser_Bookmark_View::~Browser_Bookmark_View(void)
hide_notify_popup();
for(int i = 0 ; i < m_sub_folder_list.size() ; i++ ) {
- if (m_sub_folder_list[i])
+ if (m_sub_folder_list[i]) {
delete m_sub_folder_list[i];
+ m_sub_folder_list.erase(m_sub_folder_list.begin() + i);
+ }
}
m_sub_folder_list.clear();
for(int i = 0 ; i < m_main_folder_list.size() ; i++ ) {
- if (m_main_folder_list[i])
+ if (m_main_folder_list[i]) {
delete m_main_folder_list[i];
+ m_main_folder_list.erase(m_main_folder_list.begin() + i);
+ }
}
m_main_folder_list.clear();