terminal: fix unregistering display callbacks when removing screens
We must unregister the display callback when removing a screen. Otherwise, we keep writing to the screen memory which becomes invalid then. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
4cd7b696d3
commit
00297c43cc
@ -295,6 +295,7 @@ static void free_screen(struct screen *scr, bool update)
|
||||
kmscon_text_unref(scr->txt);
|
||||
kmscon_font_unref(scr->bold_font);
|
||||
kmscon_font_unref(scr->font);
|
||||
uterm_display_unregister_cb(scr->disp, display_event, scr);
|
||||
uterm_display_unref(scr->disp);
|
||||
free(scr);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user