[gnome-remote-desktop] egl-thread: Don't require callback function for custom tasks



commit b55d3f4f7e79307d2ed63ad70ba66462c857a981
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Tue Jan 11 16:42:55 2022 +0100

    egl-thread: Don't require callback function for custom tasks
    
    To run custom tasks to unmap GL resources, no callback is needed.
    So, check if there was a callback provided before attempting to call
    the callback function.

 src/grd-egl-thread.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/grd-egl-thread.c b/src/grd-egl-thread.c
index 2bcbdd3a..0e3995e4 100644
--- a/src/grd-egl-thread.c
+++ b/src/grd-egl-thread.c
@@ -901,7 +901,8 @@ run_custom_task_in_impl (gpointer data,
 
   success = task->custom_func (task->user_data);
 
-  task->base.callback (success, task->base.callback_user_data);
+  if (task->base.callback)
+    task->base.callback (success, task->base.callback_user_data);
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]