Integrate C++11 branch into 5_1-new
This commit is contained in:
@@ -85,16 +85,16 @@ static bool RageSurface_Save_PNG( RageFile &f, char szErrorbuf[1024], RageSurfac
|
||||
error.szErr = szErrorbuf;
|
||||
|
||||
png_struct *pPng = png_create_write_struct( PNG_LIBPNG_VER_STRING, &error, PNG_Error, PNG_Warning );
|
||||
if( pPng == NULL )
|
||||
if( pPng == nullptr )
|
||||
{
|
||||
sprintf( szErrorbuf, "creating png_create_write_struct failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
png_info *pInfo = png_create_info_struct(pPng);
|
||||
if( pInfo == NULL )
|
||||
if( pInfo == nullptr )
|
||||
{
|
||||
png_destroy_write_struct( &pPng, NULL );
|
||||
png_destroy_write_struct( &pPng, nullptr );
|
||||
if( bDeleteImg )
|
||||
delete pImg;
|
||||
sprintf( szErrorbuf, "creating png_create_info_struct failed");
|
||||
|
||||
Reference in New Issue
Block a user