sys_event_queue: Fix forced event queue destruction

Add missing last existence check at sys_spu_thread_(try)receive_event and lv2_event_queue::send.
This commit is contained in:
Eladash 2020-05-02 11:22:28 +03:00 committed by Ivan
parent 37ce7056ac
commit edde748519
5 changed files with 39 additions and 44 deletions

View file

@ -1300,7 +1300,7 @@ void camera_context::operator()()
data3 = 0; // unused
}
if (queue->send(evt_data.source, CELL_CAMERA_FRAME_UPDATE, data2, data3)) [[likely]]
if (queue->send(evt_data.source, CELL_CAMERA_FRAME_UPDATE, data2, data3) == CELL_OK) [[likely]]
{
++frame_num;
}
@ -1347,7 +1347,7 @@ void camera_context::send_attach_state(bool attached)
if (auto queue = lv2_event_queue::find(key))
{
if (queue->send(evt_data.source, attached ? CELL_CAMERA_ATTACH : CELL_CAMERA_DETACH, 0, 0)) [[likely]]
if (queue->send(evt_data.source, attached ? CELL_CAMERA_ATTACH : CELL_CAMERA_DETACH, 0, 0) == CELL_OK) [[likely]]
{
is_attached = attached;
}