allow NULL on SetImage

This commit is contained in:
dborth 2009-07-15 03:38:13 +00:00
parent 4546f65b21
commit 3de479a102

View File

@ -94,9 +94,15 @@ u8 * GuiImage::GetImage()
void GuiImage::SetImage(GuiImageData * img) void GuiImage::SetImage(GuiImageData * img)
{ {
image = img->GetImage(); image = NULL;
width = img->GetWidth(); width = 0;
height = img->GetHeight(); height = 0;
if(img)
{
image = img->GetImage();
width = img->GetWidth();
height = img->GetHeight();
}
imgType = IMAGE_DATA; imgType = IMAGE_DATA;
} }