[gedit/wip/spell-checking] auto-spell: add a reference when returning the same object in new()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/spell-checking] auto-spell: add a reference when returning the same object in new()
- Date: Sun, 19 Jul 2015 14:37:15 +0000 (UTC)
commit 4f11cc13c85fa1a2622259e33742959965095170
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Jul 19 16:35:19 2015 +0200
auto-spell: add a reference when returning the same object in new()
So that the constructor is always transfer-full.
plugins/spell/gedit-automatic-spell-checker.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/plugins/spell/gedit-automatic-spell-checker.c b/plugins/spell/gedit-automatic-spell-checker.c
index 1036168..bc6af19 100644
--- a/plugins/spell/gedit-automatic-spell-checker.c
+++ b/plugins/spell/gedit-automatic-spell-checker.c
@@ -972,6 +972,7 @@ gedit_automatic_spell_checker_new (GtkSourceBuffer *buffer,
spell = g_object_get_data (G_OBJECT (buffer), AUTOMATIC_SPELL_CHECKER_KEY);
if (spell != NULL)
{
+ g_object_ref (spell);
g_return_val_if_fail (spell->spell_checker == checker, spell);
return spell;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]