Fix a possible crash when reactivating gpgol
authorAndre Heinecke <aheinecke@intevation.de>
Fri, 7 Sep 2018 07:56:35 +0000 (09:56 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 12 Sep 2018 07:01:00 +0000 (09:01 +0200)
commite5a3717ab023f71b28c8d4caefdad0c72845020a
tree6364ffe141fce399699df704f16250678ca0eaa7
parent2da40322c2614a3357eac901f970c96cb1c17dbe
Fix a possible crash when reactivating gpgol

* src/gpgoladdin.cpp (GpgolAddin::invalidateRibbons)
(GpgolAddin::addRibbon): New.
(g_ribbon_uis): Removed.

--
This keeps the ribbon ui in a member variable so that they
are cleared out when the GpgolAddin class is remvoved on
unload.

Fixes a potential crash when a user would activate gpgol
after deactivating it in the same outlook session and
stale ribbon ui pointers would be accessed.

(cherry picked from commit 50c514d6bd6026076f5f467b7d8523dff2ce97aa)
src/gpgoladdin.cpp
src/gpgoladdin.h