[gimp] app: don't unref the passed file in gimp_operation_config_[de]serialize()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't unref the passed file in gimp_operation_config_[de]serialize()
- Date: Mon, 5 Jun 2017 18:32:54 +0000 (UTC)
commit 82d23fc6ff64fb7d64642556ad7d4c482834dc86
Author: Michael Natterer <mitch gimp org>
Date: Mon Jun 5 20:32:07 2017 +0200
app: don't unref the passed file in gimp_operation_config_[de]serialize()
app/operations/gimp-operation-config.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/app/operations/gimp-operation-config.c b/app/operations/gimp-operation-config.c
index 219e9ad..13067dc 100644
--- a/app/operations/gimp-operation-config.c
+++ b/app/operations/gimp-operation-config.c
@@ -405,7 +405,11 @@ gimp_operation_config_serialize (Gimp *gimp,
g_return_if_fail (GIMP_IS_CONTAINER (container));
g_return_if_fail (file == NULL || G_IS_FILE (file));
- if (! file)
+ if (file)
+ {
+ g_object_ref (file);
+ }
+ else
{
GType config_type = gimp_container_get_children_type (container);
@@ -444,7 +448,11 @@ gimp_operation_config_deserialize (Gimp *gimp,
g_return_if_fail (GIMP_IS_CONTAINER (container));
g_return_if_fail (file == NULL || G_IS_FILE (file));
- if (! file)
+ if (file)
+ {
+ g_object_ref (file);
+ }
+ else
{
GType config_type = gimp_container_get_children_type (container);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]