GridDatabaseAdapter issue when from destroyed

This is a FMX application in Delphi 10.4. I am using the TFormInfo library to display my forms

I have a form with a TTMSFNCGrid and a TTMSFNCGridDatabaseAdapter on it. The adapter is connected to the Grid and a Datasource. When the form is displayed the data is shown in the grid as expected.

If the form is opened and then the application closed all is well. However if I use TFormInfo to free the form it throws a "No grid assigned." exception. The call stack looks ok, the only thing that is different is that the form is hidden first.

Any ideas? 


It's unclear exactly what happens when using TFormInfo. Potentially it triggers properties during the destroy mechanism. That should not happen. You could try setting the Active property of the TMSFNCGridDatabaseAdapter to False before the form is destroyed. 

Thanks. That worked. Would be interesting to work out why this is happening though - if I have time (ha ha)