Add NULL checking for drawable in sna_dri2_flip_event
The last flip complete signal may happen after the sna_dri2_destroy_window function has been called. This leads to calling frame_swap_complete with a null flip drawable. So check for that and handle accordingly.
Signed-off-by Lim Siew Hoon <[email protected]>
Reviewed-by Bob Paauwe <[email protected]>
Signed-off-by Matt Roper <[email protected]>
--- src/sna/sna_dri2.c | 4 ++++ 1 file changed, 4 insertions(+)
src/sna/sna_dri2.c +4 -0
@@ -2874,6 +2874,10 @@ static void sna_dri2_flip_event(struct sna_dri2_event *flip)case FLIP_THROTTLE :if (flip->signal) {DBG (("%s: triple buffer swap complete, unblocking client\n" , __FUNCTION__)); +if (flip->draw ==NULL ) { +sna_dri2_event_free (flip); +break ; + }frame_swap_complete (flip,DRI2_FLIP_COMPLETE ); }case FLIP_COMPLETE :
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Lim Siew Hoon
The last flip complete signal may happen after the
sna_dri2_destroy_windowfunction has been called. This leads to callingframe_swap_completewith a null flip drawable. So check for that and handle accordingly.
Treating the symptom and not the cause.
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx