Tue, 11 Jun 2024 21:47:43 +0200
fix gtk executing ui_job_finished even if no finish callback was set
ui/gtk/toolkit.c | file | annotate | diff | comparison | revisions |
--- a/ui/gtk/toolkit.c Tue Jun 11 21:45:39 2024 +0200 +++ b/ui/gtk/toolkit.c Tue Jun 11 21:47:43 2024 +0200 @@ -185,8 +185,10 @@ static void* ui_jobthread(void *data) { UiJob *job = data; int result = job->job_func(job->job_data); - if(!result) { + if(!result && job->finish_callback) { g_idle_add(ui_job_finished, job); + } else { + free(job); } return NULL; }