Access Violation if Themes have been changed
In applications that change their themes on the fly I get an access violation if the application is closed. The issue happens here:
unit VirtualTrees.StyleHooks;
...
finalization
TCustomStyleEngine.UnRegisterStyleHook(TVirtualStringTree, TVclStyleScrollBarsHook);
TCustomStyleEngine.UnRegisterStyleHook(TVirtualDrawTree, TVclStyleScrollBarsHook);
As a workaround I surrounded the UnRegisterStyleHook call with a try except block. Maybe there is something better.
In the Advanced demo project I added the unit Vcl-Themes and a button with the code:
if TStyleManager.ActiveStyle.IsSystemStyle then
TStyleManager.TrySetStyle('Glow')
else
TStyleManager.TrySetStyle('Windows');
I tried it on several pages and pressed this button multiple times, but no error occurred at program termination (RAD Studio 11.1, Windows 10). Please provide a sample project that allows to replicate the issue or a pull request that fixes the issue.
No repro steps were provided in the past 4 months and no similar reports were received. Therefore, closing this issue.