[gnome-photos] edit-palette: Don't trample over GIO
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] edit-palette: Don't trample over GIO
- Date: Fri, 27 Nov 2015 14:24:59 +0000 (UTC)
commit 6d5d5b33458b25807895bf3fa89aed3646f47481
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Nov 24 16:53:23 2015 +0100
edit-palette: Don't trample over GIO
The list returned by g_io_extension_point_get_extensions is owned by
GIO and we should not modify it. So, copy the list before sorting it.
src/photos-edit-palette.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-edit-palette.c b/src/photos-edit-palette.c
index c7f13d9..956b253 100644
--- a/src/photos-edit-palette.c
+++ b/src/photos-edit-palette.c
@@ -172,6 +172,7 @@ photos_edit_palette_init (PhotosEditPalette *self)
extension_point = g_io_extension_point_lookup (PHOTOS_TOOL_EXTENSION_POINT_NAME);
extensions = g_io_extension_point_get_extensions (extension_point);
+ extensions = g_list_copy (extensions);
extensions = g_list_sort (extensions, photos_edit_palette_extensions_sort_func);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
@@ -204,6 +205,7 @@ photos_edit_palette_init (PhotosEditPalette *self)
gtk_widget_show_all (GTK_WIDGET (self));
g_object_unref (size_group);
+ g_list_free (extensions);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]