Skip to content

Commit

Permalink
Added at least some error message if the framework couldn't load the …
Browse files Browse the repository at this point in the history
…image.
  • Loading branch information
slouken committed May 11, 2010
1 parent 8eeded8 commit 9689a57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion IMG_ImageIO.c
Expand Up @@ -149,14 +149,18 @@ static CGImageRef CreateCGImageFromCGImageSource(CGImageSourceRef image_source)
{
CGImageRef image_ref = NULL;

if(NULL == image_source)
if(NULL == image_source)
{
return NULL;
}

// Get the first item in the image source (some image formats may
// contain multiple items).
image_ref = CGImageSourceCreateImageAtIndex(image_source, 0, NULL);
if(NULL == image_ref)
{
IMG_SetError("CGImageSourceCreateImageAtIndex() failed");
}
return image_ref;
}

Expand Down

0 comments on commit 9689a57

Please sign in to comment.