Hi Andy,
This isn't an error message. It's just a warning message telling you that the processing histories of one or more images could be lost if you exit the application.
You know the correct way to save a processing history: create a ProcessContainer icon from the History Explorer window, then save it as a PSM file.
However, the application has no way to be absolutely sure that you have saved it. For example, you can change the history of an image after saving the icon in many ways. The modular architecture of the PixInsight platform and its complexity make it very difficult to keep an accurate track of all events that can modify processing histories, so the best option is to show a warning message each time a processing history is about to be destroyed. This can be a little annoying, but much better than losing some process parameters that have required hours of trial-error work to get them fine tuned.
When you see one of these messages, just make sure that you are not going to lose something important, then click Yes to close the warning message and exit the application.
The same message (or a similar one) appears when you try to close an image that has a nonempty processing history, even if all of its states have been undone. This includes previews with stored states.