Hello
I have a strange bug. My document has a subclass of NSView in which I do custom drawing. I can open multiple documents and the drawing is all fine.
However, when I close the first document (and only the first document) that was created during that session, I get a bunch of errors. These errors occur when drawing in the other windows.
Any idea why this would be happening? Why would the context only be valid when the first document is around?
I have a strange bug. My document has a subclass of NSView in which I do custom drawing. I can open multiple documents and the drawing is all fine.
However, when I close the first document (and only the first document) that was created during that session, I get a bunch of errors. These errors occur when drawing in the other windows.
Code:
....
<Error>: CGContextAddCurveToPoint: invalid context
<Error>: CGContextAddCurveToPoint: invalid context
<Error>: CGContextAddCurveToPoint: invalid context
<Error>: CGContextAddCurveToPoint: invalid context
<Error>: CGContextDrawPath: invalid context
<Error>: CGContextRestoreGState: invalid context
Any idea why this would be happening? Why would the context only be valid when the first document is around?