This is an older project I am updating. I looked in the documentation and I can’t see an issue with my code.
I have a Canvas which has a super class with several methods in it. I have updated most of the code to handle graphics and drawing but I am stumped. In my Draw method the first line throws an error but the code looks right. The method has a g as graphics parameter.
Check the callstack on error to find where its being called from with nil
Failing that rename draw to draw2 and compile to see if theres a call coming from outside a paint as you might have done so in some code that only runs at release time