st/mesa: Fix inversed test in st_api_destroy_drawable
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 27 Jul 2017 02:12:24 +0000 (11:12 +0900)
committerMichel Dänzer <michel@daenzer.net>
Thu, 27 Jul 2017 02:12:24 +0000 (11:12 +0900)
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 <commendsarnex@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_manager.c

index 6447403..97bf89f 100644 (file)
@@ -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);