summaryrefslogtreecommitdiff
path: root/src/job-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/job-manager.c')
-rw-r--r--src/job-manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/job-manager.c b/src/job-manager.c
index 352229b..e3ae00d 100644
--- a/src/job-manager.c
+++ b/src/job-manager.c
@@ -138,7 +138,11 @@ thread_func (gpointer data)
s1 = g_strconcat (job->setup->real_templates_dir, "/", job->setup->template_photo, NULL);
s2 = g_strconcat (job->items->base_dir, "/", (item->path == NULL && item->preview) ? item->preview : item->path, NULL);
s3 = g_strconcat (job->dst_dir, "/", imgname, GET_EXT (job->setup->index_file_name), NULL);
+ /* We need to lock job->items as we're doing *lots* of accesses to it */
+ /* There were some replace_table failures due to that */
+ G_LOCK (items);
write_html_image (job->setup, s1, s2, s3, item, job->items);
+ G_UNLOCK (items);
g_free (s1);
g_free (s2);
g_free (s3);