AV in TAdvToolbar

I'm getting a sporadic AV when changing styles. It is in TAdvCustomToolBar.SetCompact.


Apparently sometimes Pager.FGlowButtonAppearance is not assigned.

Changing 

if Assigned(FCompactBtn) and Assigned(Pager) then

to

if Assigned(FCompactBtn) and Assigned(Pager) and assigned(Pager.FGlowButtonAppearance) then

fixes the problem.



To try to understand the cause of the problem, are you creating / destroying some things dynamically in your application at times when compact state is changing?
We'll apply the extra guard against the AV but we'd prefer to understand the cause of the problem.

"are you creating / destroying some things dynamically in your application at times when compact state is changing?"


I don't think so. It happens when changing themes at run time, but I can't seem to find a sequence that causes it reliably.