Deleting tex pointer on error.
Protecting _image pointer from unsafe changes.
Adding some warnings.