Only handle MAM response if window still exists
Before this patch the following scenario lead to a segfault: 1. open a window that sends a MAM request 2. fast enough close that window again before the MAM response was processed Once the MAM response is received we'd call `_mam_rsm_id_handler()` from the `_iq_handler()` and `window` would point to a non-existant window which leads to a segfault. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
@@ -712,6 +712,8 @@ ui_close_win(int index)
|
||||
}
|
||||
}
|
||||
|
||||
// remove the IQ handlers
|
||||
iq_handlers_remove_win(window);
|
||||
wins_close_by_num(index);
|
||||
title_bar_console();
|
||||
status_bar_current(1);
|
||||
|
||||
Reference in New Issue
Block a user