From afc27c30eb5a380d2e8e14f3193ee97f08cd754a Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Tue, 7 Mar 2017 20:10:18 +0100 Subject: [PATCH] Quick buildfix (should probably just enable exceptions on Android) --- Common/ChunkFile.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Common/ChunkFile.h b/Common/ChunkFile.h index ad318ff80c..e1f3986d59 100644 --- a/Common/ChunkFile.h +++ b/Common/ChunkFile.h @@ -17,6 +17,8 @@ #pragma once +#include "ppsspp_config.h" + // Extremely simple serialization framework. // Currently mis-named, a native ChunkFile is something different (a RIFF file) @@ -644,12 +646,16 @@ public: // Get data size_t const sz = MeasurePtr(_class); u8 *buffer = nullptr; +#if PPSSPP_PLATFORM(ANDROID) + buffer = new u8[sz]; +#else try { buffer = new u8[sz]; } catch (std::bad_alloc e) { return ERROR_BAD_ALLOC; } +#endif Error error = SavePtr(buffer, _class); // SaveFile takes ownership of buffer