I create a picture.
When I try to draw into the graphics object I get a nil exception. The graphics object is there, but the backing picture is not.
So, I (as an experiment) placed the picture in a property of a module. Same thing.
The picture is, in fact, created when I say “new Picture,” but when I get around to using it, it’s gone.
At the moment it’s to convoluted. But, I had an idea. I’ll make the property holding the image a computer property. I should be able to catch when it disappears. With any luck, I’m clearing it from somewhere.
I will bet that by “disappear” it is actually going out of scope… but with out knowing what you are doing it is all a guess
If done correctly, there should be nothing to “catch”… try to re-engineer it to be correct, putting band-aids will ultimately lead to the patient bleeding to death.