From 908c677c1e0b8ecea61dc0a1136112ed96ed8a60 Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Fri, 2 Oct 2020 15:52:00 +0200 Subject: [PATCH] Fix segfault on capture --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index d37c7f3..59eb8e3 100644 --- a/main.c +++ b/main.c @@ -485,6 +485,8 @@ process_image(const int *p, int size) cairo_paint(cr); gtk_widget_queue_draw_area(preview, 0, 0, preview_width, preview_height); cairo_destroy(cr); + g_object_unref(pixbufrot); + g_object_unref(pixbuf); } else { capture--; time(&rawtime); @@ -614,6 +616,7 @@ process_image(const int *p, int size) g_clear_error(&error); } + g_object_unref(pixbufrot); g_object_unref(pixbuf); // Start post-processing the captured burst @@ -623,8 +626,6 @@ process_image(const int *p, int size) } } - g_object_unref(pixbufrot); - g_object_unref(pixbuf); } static gboolean