fix JIRA issue TREL-17, TDIS-4421 that setting ug is crashed
authorSan Cho <san.cho@samsung.com>
Tue, 2 Apr 2013 11:17:14 +0000 (20:17 +0900)
committerSan Cho <san.cho@samsung.com>
Tue, 2 Apr 2013 11:21:44 +0000 (20:21 +0900)
Change-Id: I55e2914dfd87d39b091852d7d6f670368e759a6a

setting/src/email-setting.c

index 6f1bd39..e4888a8 100755 (executable)
@@ -335,6 +335,19 @@ static void on_destroy(ui_gadget_h ug, service_h service, void *priv)
        /* theme extension */
        elm_theme_free(ugd->theme);
 
+       /* destroying view */
+       int count;
+       Viewtype cur_view;;
+       if (ugd->view_top >= 0) {
+        for (count = ugd->view_top; count >= 0; count--) {
+            cur_view = ugd->view_st[count];
+            vd = ugd->vd[cur_view];
+            debug_log("destorying view: %s", vd->grp_nm);
+            if (vd->destroy)
+                vd->destroy(vd);
+        }
+    }
+
        /* Free Viewdata's memory */
        for (i = VIEW_SETTING; i < VIEW_END; i++) {
                vd = ugd->vd[i];