From c6973babc6d9d13583e318196bce44ee56cdfab1 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Sun, 28 Aug 2011 21:27:34 +0000 Subject: [PATCH] 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 --- src/common/imagtiff.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/imagtiff.cpp b/src/common/imagtiff.cpp index c71497af3b..5229f62fdf 100644 --- a/src/common/imagtiff.cpp +++ b/src/common/imagtiff.cpp @@ -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); -- 2.45.2