elementary: atspi - fix dbus abort

This patch set fix following abort occured on dbus side.

(gdb) bt
0   __GI_raise (sig=sig@entry=6)
1   __GI_abort ()
2   _dbus_abort ()
3   _dbus_warn_check_failed
4   dbus_message_iter_append_basic
5   append_basic
6   eldbus_message_iter_basic_append
7   _bridge_signal_send
8   _text_text_removed_send
9   _bridge_accessible_event_dispatch
10  _elm_interface_atspi_accessible_event_emit
11  elm_interface_atspi_accessible_event_emit
12  _entry_changed_user_signal_cb

(gdb) f 12
(gdb) p *$1
$2 = {change = {insert = {content = 0x0, pos = 0, plain_length = 1},
                del = {content = 0x0, start = 0, end = 1}},
      insert = 0 '\000', merge = 0 '\000'}

The following patch set would fix the root cause of this problem.
https://phab.enlightenment.org/D5240
This commit is contained in:
Shinwoo Kim 2017-09-28 20:08:25 +09:00
parent 76ab8e3f54
commit 6f06979cdc
1 changed files with 12 additions and 0 deletions

View File

@ -4135,6 +4135,12 @@ _text_text_inserted_send(void *data, const Efl_Event *event)
if (!STATE_TYPE_GET(pd->object_broadcast_mask, ATSPI_OBJECT_EVENT_TEXT_CHANGED))
return;
if (!info->content)
{
WRN("Try to send signal with NULL value");
return;
}
_bridge_signal_send(data, event->object, ATSPI_DBUS_INTERFACE_EVENT_OBJECT,
&_event_obj_signals[ATSPI_OBJECT_EVENT_TEXT_CHANGED], "insert", info->pos, info->len, "s", info->content);
}
@ -4149,6 +4155,12 @@ _text_text_removed_send(void *data, const Efl_Event *event)
if (!STATE_TYPE_GET(pd->object_broadcast_mask, ATSPI_OBJECT_EVENT_TEXT_CHANGED))
return;
if (!info->content)
{
WRN("Try to send signal with NULL value");
return;
}
_bridge_signal_send(data, event->object, ATSPI_DBUS_INTERFACE_EVENT_OBJECT,
&_event_obj_signals[ATSPI_OBJECT_EVENT_TEXT_CHANGED], "delete", info->pos, info->len, "s", info->content);
}