Graphics commands without Graphics errors

BlitzMax Forums/BlitzMax Bug Reports/Graphics commands without Graphics errors

The error mode is kinda correct, imho.

When you use the Graphics() command, all you're doing is creating a graphics Object to draw images etc onto. If that object doesn't exist (because you haven't created a Graphics object yet), "attempt to access field or method of null object" is a perfectly acceptable and accurate error message.

A quick look in the debugger should help you to identify what the problem is. You're dealing with two objects, for example, a TImage and a TGraphics object. If you have a Null object error, and you know one object (the image) definitely exists, then the other object is logically where the problem is.