st/vdpau: destroy handle table only when it's empty
authorChristian König <christian.koenig@amd.com>
Thu, 23 May 2013 17:31:08 +0000 (19:31 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 27 May 2013 16:18:32 +0000 (18:18 +0200)
Signed-off-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/htab.c

index 39ff7be37869b9c754717f5a73ff5d7d057388e4..8b809f2cb5e042d60f616f7d2aa95c33281d0394 100644 (file)
@@ -55,7 +55,7 @@ void vlDestroyHTAB(void)
 {
 #ifdef VL_HANDLES
    pipe_mutex_lock(htab_lock);
-   if (htab) {
+   if (htab && !handle_table_get_first_handle(htab)) {
       handle_table_destroy(htab);
       htab = NULL;
    }