[gnome-photos/wip/rishi/edit-preview: 6/9] edit-palette: Don't trample over GIO
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/edit-preview: 6/9] edit-palette: Don't trample over GIO
- Date: Tue, 24 Nov 2015 16:42:28 +0000 (UTC)
commit f4d3d154cddd0f843c748cc855771256508f7995
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 6138b64..bf001e8 100644
--- a/src/photos-edit-palette.c
+++ b/src/photos-edit-palette.c
@@ -193,6 +193,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);
@@ -273,6 +274,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]