Goodbye, findDirty.
Set state->currentScript to NULL when it is freed.

There is no reason not to.
Declare all const function arguments as const.
Return if assImage is NULL.

It will be NULL if there is nothing to render.

This might smother some errors too, but I hope not.
Hello, checkBounds.
Formatting.