mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 10:29:49 +01:00
rootston exit: fix drm destroy
wlr_drm_connector were being freed without removing them from the drm->outputs list, segfaulting on destroy
This commit is contained in:
parent
1d0973f6c8
commit
f451ea3639
2 changed files with 4 additions and 2 deletions
|
@ -29,8 +29,8 @@ static void wlr_drm_backend_destroy(struct wlr_backend *backend) {
|
|||
|
||||
wlr_drm_restore_outputs(drm);
|
||||
|
||||
struct wlr_drm_connector *conn;
|
||||
wl_list_for_each(conn, &drm->outputs, link) {
|
||||
struct wlr_drm_connector *conn, *next;
|
||||
wl_list_for_each_safe(conn, next, &drm->outputs, link) {
|
||||
wlr_output_destroy(&conn->output);
|
||||
}
|
||||
|
||||
|
|
|
@ -645,6 +645,7 @@ static void wlr_drm_connector_destroy(struct wlr_output *output) {
|
|||
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
|
||||
wlr_drm_connector_cleanup(conn);
|
||||
wl_event_source_remove(conn->retry_pageflip);
|
||||
wl_list_remove(&conn->link);
|
||||
free(conn);
|
||||
}
|
||||
|
||||
|
@ -823,6 +824,7 @@ void wlr_drm_scan_connectors(struct wlr_drm_backend *drm) {
|
|||
|
||||
drmModeFreeCrtc(conn->old_crtc);
|
||||
wl_event_source_remove(conn->retry_pageflip);
|
||||
wl_list_remove(&conn->link);
|
||||
free(conn);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue