dylex / slack-libpurple

Slack module for libpurple
GNU General Public License v2.0
280 stars 38 forks source link

Look-up slack chat window again after timeout #179

Closed djha-skin closed 1 year ago

djha-skin commented 1 year ago

This change addresses #178, which is a ticket concerning constant daily crashes of pidgin.

The crashes seem to happen when a chat window is closed while a "user is typing" timeout window is open. When this happens, the chat pointer stored is freed by pidgin. Then it is dereferenced and crashes.

The change here is to look the chat up again at the end of the timeout. That way a null returned pointer informs the program that the chat is no longer open.

The change also gets rid of what I believe to be a double-free.

djha-skin commented 1 year ago

Don't know if this is perfect. I've been using it for a while now, and sometimes after I use pidgin for a long time a bug arises. When I post, I hit enter and my name pops up, but my message is empty. I suspect this bug may have been introduced by this change.