[evolution] Bug 358162 - Crash in gal_a11y_e_cell_popup_new()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 358162 - Crash in gal_a11y_e_cell_popup_new()
- Date: Fri, 14 Aug 2015 12:24:49 +0000 (UTC)
commit aa1c1ae3719c10345ab918db7d49ba1f5660bba1
Author: Milan Crha <mcrha redhat com>
Date: Fri Aug 14 14:24:08 2015 +0200
Bug 358162 - Crash in gal_a11y_e_cell_popup_new()
e-util/e-cell-popup.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-cell-popup.c b/e-util/e-cell-popup.c
index 476b6c4..ee7fc54 100644
--- a/e-util/e-cell-popup.c
+++ b/e-util/e-cell-popup.c
@@ -181,7 +181,7 @@ ecp_new_view (ECell *ecell,
ecp_view = g_new0 (ECellPopupView, 1);
- ecp_view->cell_view.ecell = ecell;
+ ecp_view->cell_view.ecell = g_object_ref (ecell);
ecp_view->cell_view.e_table_model = table_model;
ecp_view->cell_view.e_table_item_view = e_table_item_view;
ecp_view->cell_view.kill_view_cb = NULL;
@@ -202,6 +202,15 @@ ecp_kill_view (ECellView *ecv)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
+ if (E_IS_CELL_POPUP (ecp_view->cell_view.ecell)) {
+ ECellPopup *ecp = E_CELL_POPUP (ecp_view->cell_view.ecell);
+
+ if (ecp->popup_cell_view == ecp_view)
+ ecp->popup_cell_view = NULL;
+ }
+
+ g_clear_object (&ecp_view->cell_view.ecell);
+
if (ecp_view->cell_view.kill_view_cb)
ecp_view->cell_view.kill_view_cb (
ecv, ecp_view->cell_view.kill_view_cb_data);
@@ -528,6 +537,8 @@ e_cell_popup_queue_cell_redraw (ECellPopup *ecp)
{
ETableItem *eti;
+ g_return_if_fail (ecp->popup_cell_view != NULL);
+
eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
e_table_item_redraw_range (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]