From: Michel Dänzer Date: Thu, 27 Jul 2017 02:12:24 +0000 (+0900) Subject: st/mesa: Fix inversed test in st_api_destroy_drawable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57132d126f2e129fc2959dcc2c0a8126389d07ba;p=mesa.git st/mesa: Fix inversed test in st_api_destroy_drawable Fixes a drawable leak. Fixes: bbc29393d3be ("st/mesa: create framebuffer iface hash table per st manager") Bugzilla: https://bugs.freedesktop.org/101930 Tested-by: Nick Sarnie Reviewed-by: Brian Paul --- diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 6447403fc66..97bf89fc655 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -583,7 +583,7 @@ static void st_api_destroy_drawable(struct st_api *stapi, struct st_framebuffer_iface *stfbi) { - if (stfbi) + if (!stfbi) return; st_framebuffer_iface_remove(stfbi->state_manager, stfbi);