aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-09-07 16:30:11 +0200
committerThomas White <taw@physics.org>2021-09-07 16:30:11 +0200
commita37c909fa4039b8c45cca2ff10ed8fdaac107a01 (patch)
tree30bbb619b64dacfea2815f0e66b4646c72011be0 /src
parentb5d11b3ce90ae746e534c1160f6b4541fbf1dd4f (diff)
GUI remove_task: Remove from list before freeing
Diffstat (limited to 'src')
-rw-r--r--src/crystfel_gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index 487ac32f..6dd9b37d 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -1167,9 +1167,9 @@ static void remove_task(struct crystfelproject *proj,
if ( task->backend->free_task != NULL ) {
task->backend->free_task(task->job_priv);
}
- free(task);
proj->tasks = g_slist_remove(proj->tasks, task);
+ free(task);
}