#4 Fix pidgin crashes when trying to remove a channel.
Merged 8 months ago by jskarvad. Opened 8 months ago by jackorp.
rpms/ jackorp/pidgin fix_crash  into  rawhide

@@ -0,0 +1,43 @@ 

+ # HG changeset patch

+ # Node ID 45afca0be177

+ # Parent  f373c5662415

+ diff --git a/pidgin/plugins/spellchk.c b/pidgin/plugins/spellchk.c

+ --- a/pidgin/plugins/spellchk.c

+ +++ b/pidgin/plugins/spellchk.c

+ @@ -289,12 +289,14 @@

+  

+  	g_return_if_fail(spell != NULL);

+  

+ -	buffer = gtk_text_view_get_buffer(spell->view);

+ +	if (spell->view != NULL) {

+ +		buffer = gtk_text_view_get_buffer(spell->view);

+  

+ -	g_signal_handlers_disconnect_matched(buffer,

+ -			G_SIGNAL_MATCH_DATA,

+ -			0, 0, NULL, NULL,

+ -			spell);

+ +		g_signal_handlers_disconnect_matched(buffer,

+ +		                                     G_SIGNAL_MATCH_DATA,

+ +		                                     0, 0, NULL, NULL,

+ +		                                     spell);

+ +	}

+  	g_free(spell->word);

+  	g_free(spell);

+  }

+ @@ -645,6 +647,7 @@

+  	/* attach to the widget */

+  	spell = g_new0(spellchk, 1);

+  	spell->view = view;

+ +	g_object_add_weak_pointer(G_OBJECT(view), (gpointer*)&spell->view);

+  

+  	g_object_set_data_full(G_OBJECT(view), SPELLCHK_OBJECT_KEY, spell,

+  			(GDestroyNotify)spellchk_free);

+ @@ -2139,6 +2142,8 @@

+  		spellchk *spell = g_object_get_data(G_OBJECT(gtkconv->entry), SPELLCHK_OBJECT_KEY);

+  

+  		g_signal_handlers_disconnect_by_func(gtkconv->entry, message_send_cb, spell);

+ +		g_object_remove_weak_pointer(G_OBJECT(gtkconv->entry),

+ +		                             (gpointer*)&spell->view);

+  		g_object_set_data(G_OBJECT(gtkconv->entry), SPELLCHK_OBJECT_KEY, NULL);

+  	}

+  

file modified
+12 -1
@@ -125,7 +125,7 @@ 

  

  Name:           pidgin

  Version:        2.14.10

- Release:        2%{?dist}

+ Release:        3%{?dist}

  License:        BSD and GPLv2+ and GPLv2 and LGPLv2+ and MIT

  # GPLv2+ - libpurple, finch, pidgin, most prpls

  # GPLv2 - novell prpls
@@ -166,6 +166,10 @@ 

  ## Patches 100+: To be Included in Future Upstream

  # upstream ticket https://developer.pidgin.im/ticket/16593

  Patch100:       pidgin-2.14.7-do-not-disable-wall.patch

+ # Upstream ticket: https://issues.imfreedom.org/issue/PIDGIN-17702/

+ # Upstream review: https://reviews.imfreedom.org/r/1951/diff/2/

+ # Upstream commit: https://keep.imfreedom.org/pidgin/pidgin/rev/bf6049713e98

+ Patch101:       pidgin-2.14.11-fix-crash-when-closing-a-group-chat-with-spellchk.patch

  

  Summary:        A Gtk+ based multiprotocol instant messaging client

  
@@ -468,6 +472,9 @@ 

  # https://developer.pidgin.im/ticket/16593

  %patch100 -p1 -b .do-not-disable-wall

  

+ # Upstream review: https://reviews.imfreedom.org/r/1951/diff/2/

+ %patch101 -p1 -b .spellchk

+ 

  # Our preferences

  cp %{SOURCE1} prefs.xml

  
@@ -701,6 +708,10 @@ 

  %endif

  

  %changelog

+ * Sat Dec 10 2022 Jarek Prokop <jprokop@redhat.com> - 2.14.10-3

+ - Fix pidgin crashes when trying to remove a channel.

+   Resolves: rhbz#2112810

+ 

  * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.10-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

  

This has bugged me for a long time, now there is an upstream fix.

If you accept this, please also backport this to Fedora 37. I am on rawhide (~= Fedora 38), but I have to assume this is still present on Fedora 37

I built this change in copr and verified the fix works: https://copr.fedorainfracloud.org/coprs/jackorp/pidgin_spellchk/

Resolves: rhbz#2112810

Upstream references:
Upstream ticket: https://issues.imfreedom.org/issue/PIDGIN-17702/
Upstream review: https://reviews.imfreedom.org/r/1951/diff/2/
Upstream commit: https://keep.imfreedom.org/pidgin/pidgin/rev/bf6049713e98

Pull-Request has been merged by jskarvad

8 months ago