Call GetAlpha() to get a pointer instead of checking for alpha first.

It's safe to call GetAlpha() even if there's no alpha because in that case NULL will be returned.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2011-08-28 21:27:34 +00:00
parent 2824962c5a
commit c6973babc6

View File

@@ -411,7 +411,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
unsigned char *ptr = image->GetData();
ptr += w*3*(h-1);
unsigned char *alpha = hasAlpha ? image->GetAlpha() : NULL;
unsigned char *alpha = image->GetAlpha();
if ( hasAlpha )
alpha += w*(h-1);