Fix nullpointer deref
This commit is contained in:
parent
4f08382c69
commit
a9454fdf9c
4 changed files with 9 additions and 3 deletions
src
|
@ -152,7 +152,8 @@ void Sprite::setBitmap(Bitmap *bitmap)
|
|||
if (p->bitmap == bitmap)
|
||||
return;
|
||||
|
||||
bitmap->ensureNonMega();
|
||||
if (bitmap)
|
||||
bitmap->ensureNonMega();
|
||||
|
||||
p->bitmap = bitmap;
|
||||
*p->srcRect = bitmap->rect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue