Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeanyNumberedBookmarks: Fix crash on re-unload #804

Merged
merged 2 commits into from
Dec 20, 2018

Conversation

b4n
Copy link
Member

@b4n b4n commented Dec 20, 2018

Try to load the plugin, unload it, everything's fine. Re-load it, and unload it. Boom 💥. It probably also crashes when being used after second load.

b4n added 2 commits December 20, 2018 14:09
When unloading the plugin properly remove the GObject data it has set
on documents.  This avoids leaving dangling pointers to freed memory a
subsequent re-loading of the plugin will try and use, leading to a
crash.

Fixes geany#803.
This should not be a problem so long as the plugin library is actually
unloaded, but would be a problem if the module was resident, which is
handy for debugging.  So, properly reset the variable to NULL after
free for it to still have a sane value afterward.
@b4n b4n added this to the 1.35.0 milestone Dec 20, 2018
@frlan frlan merged commit a1c7aef into geany:master Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants