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>
Fri, 7 Sep 2018 07:56:35 +0000 (09:56 +0200)
commit50c514d6bd6026076f5f467b7d8523dff2ce97aa
tree7079225c022c7fcb644f174f67d3b81a0711a0f8
parent1cefdea05092b68a3db0c6eaa32341c3123f9f37
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.
src/gpgoladdin.cpp
src/gpgoladdin.h