mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-08-01 18:49:11 -06:00
fix crashes when inserting/ejecting GBA carts/addons with nothing loaded
This commit is contained in:
@ -241,8 +241,6 @@ public:
|
||||
[[nodiscard]] CartCommon* GetCart() noexcept { return Cart.get(); }
|
||||
[[nodiscard]] const CartCommon* GetCart() const noexcept { return Cart.get(); }
|
||||
|
||||
void LoadAddon(void* userdata, int type) noexcept;
|
||||
|
||||
/// @return The cart that was in the cart slot if any,
|
||||
/// or \c nullptr if the cart slot was empty.
|
||||
std::unique_ptr<CartCommon> EjectCart() noexcept;
|
||||
@ -309,6 +307,8 @@ std::unique_ptr<CartCommon> ParseROM(const u8* romdata, u32 romlen, const u8* sr
|
||||
/// or \c nullptr if there was an error.
|
||||
std::unique_ptr<CartCommon> ParseROM(std::unique_ptr<u8[]>&& romdata, u32 romlen, std::unique_ptr<u8[]>&& sramdata, u32 sramlen, void* userdata = nullptr);
|
||||
|
||||
std::unique_ptr<CartCommon> LoadAddon(int type, void* userdata);
|
||||
|
||||
}
|
||||
|
||||
#endif // GBACART_H
|
||||
|
Reference in New Issue
Block a user