tdm_output_hwc_set_client_target_buffer: allow pass 0 for num_wnds 91/164491/1
authorKonstantin Drabeniuk <k.drabeniuk@samsung.com>
Tue, 19 Dec 2017 08:56:56 +0000 (10:56 +0200)
committerKonstantin Drabeniuk <k.drabeniuk@samsung.com>
Tue, 19 Dec 2017 08:57:35 +0000 (10:57 +0200)
Change-Id: Iaa0df64ec73bb57c8a14647fbd312917fb1e2c76
Signed-off-by: Konstantin Drabeniuk <k.drabeniuk@samsung.com>
src/tdm_output.c

index 27c83aeddaa5c93717ef4519f1ee5f284a551c17..76192a276885a4dd648077f0e131723d8b7b253d 100644 (file)
@@ -1751,6 +1751,15 @@ tdm_output_hwc_set_client_target_buffer(tdm_output *output, tbm_surface_h target
                _tdm_target_window_dump_buffer((tdm_private_output *)output, target_buffer);
        /* LCOV_EXCL_STOP */
 
+       if (num_wnds == 0) {
+               ret = func_output->output_hwc_set_client_target_buffer(private_output->output_backend, target_buffer,
+                                       damage, NULL, 0);
+
+               _pthread_mutex_unlock(&private_display->lock);
+
+               return ret;
+       }
+
        composited_wnds_backend = calloc(num_wnds, sizeof(tdm_hwc_window *));
        if (!composited_wnds_backend) {
                /* LCOV_EXCL_START */