From 33f7f37ca7b737f8de2bd4e04da28aebfcf91de1 Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Sun, 30 Mar 2014 03:21:41 +1300 Subject: [PATCH] Fixes null ptr in gcc, probably to do with operator precedence. @Bigpet was all over this one. --- rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp b/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp index 095ff1ed42..ed4c70514b 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp @@ -155,7 +155,7 @@ int cellPngDecDecodeData(u32 mainHandle, u32 subHandle, mem8_ptr_t data, const m //Decode PNG file. (TODO: Is there any faster alternative? Can we do it without external libraries?) int width, height, actual_components; - std::shared_ptr image(stbi_load_from_memory(png, fileSize, &width, &height, &actual_components, 4)); + std::shared_ptr image(stbi_load_from_memory(png.GetPtr(), fileSize, &width, &height, &actual_components, 4)); if (!image) return CELL_PNGDEC_ERROR_STREAM_FORMAT; uint image_size = width * height;