PanX crashes when clicking the red dot on the datasheet!

With version b18, every shared and most stand-alone databases crashed immediately when I clicked the red-close button on the datasheet! (I test 5 shared databases and 5 stand-alone databases.)

But using the Close Window menu item or command-W does not crash and closes the window normally.

I cannot duplicate this. I tried multiple shared and unshared databases on two computers, one running Big Sur and one running Sierra. No crashes closing any kind of window.

On the other hand, there was a change made in the code for closing a database, for the new Always keep database open (even if all windows are closed) option. It was a very minor change, not even one line of code (just a part of one line changed). I don’t see any problem with the code though. The code was already checking if the database was a library database, and if so, making the database secret instead of closing it. Now it also does this if the always keep open option is enabled. If it is not enabled, the code works exactly as before (i.e. closes the database).