Add a function to check if the handled pointer is NULL.
This commit is contained in:
parent
f3258c7504
commit
0ec70a22fd
2 changed files with 12 additions and 0 deletions
|
@ -343,6 +343,11 @@ void ttexture::update_pixels(SDL_Surface *surf)
|
|||
}
|
||||
}
|
||||
|
||||
bool ttexture::null() const
|
||||
{
|
||||
return texture_ == NULL;
|
||||
}
|
||||
|
||||
void ttexture::initialise_from_surface(SDL_Renderer& renderer, const int access)
|
||||
{
|
||||
if(access == SDL_TEXTUREACCESS_STATIC) {
|
||||
|
|
|
@ -281,6 +281,13 @@ public:
|
|||
*/
|
||||
void update_pixels(SDL_Surface* surf);
|
||||
|
||||
/**
|
||||
* Tells whether the instance really handles an SDL_Texture object.
|
||||
*
|
||||
* @return True if the handled pointer is NULL.
|
||||
*/
|
||||
bool null() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
* The reference count of the texture.
|
||||
|
|
Loading…
Add table
Reference in a new issue