Commit 3b2885fe authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

XCB-XVideo: no need to detach segment explicitly before disconnection

The X server will do as part of garbage collection - as it does for our
window, graphic context, or if VLC crashes.
parent 4a590357
......@@ -260,11 +260,8 @@ void PictureResourceFree (picture_resource_t *res, xcb_connection_t *conn)
xcb_shm_seg_t segment = res->p_sys->segment;
if (segment != 0)
assert (conn != NULL);
if (conn != NULL && segment != 0)
xcb_shm_detach (conn, segment);
shmdt (res->p->p_pixels);
......@@ -529,7 +529,7 @@ static void Close (vlc_object_t *obj)
if (!res->p->p_pixels)
PictureResourceFree (res, p_sys->conn);
PictureResourceFree (res, NULL);
picture_pool_Delete (p_sys->pool);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment