mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-05 20:24:01 +01:00
Quick buildfix (should probably just enable exceptions on Android)
This commit is contained in:
1 parent
529d84a57b
commit
afc27c30eb
1 file changed
+6
@@ -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
|
||||
|
||||
Reference in new issue
Block a user