From 733c1d0ce4c3c7b9b02271cd70e73cd9be9091c7 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 26 Jun 2021 17:07:09 +0200 Subject: [PATCH] Fixes C Interface for GetPreEvolution function --- CInterface/Library/SpeciesLibrary.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CInterface/Library/SpeciesLibrary.cpp b/CInterface/Library/SpeciesLibrary.cpp index cf5cdaf..71c4d78 100644 --- a/CInterface/Library/SpeciesLibrary.cpp +++ b/CInterface/Library/SpeciesLibrary.cpp @@ -10,8 +10,10 @@ export u8 PkmnLib_SpeciesLibrary_FindPreEvolution(const PokemonSpecies*& out, co const PokemonSpecies* species) { Try( auto v = p->FindPreEvolution(species); - if (!v.has_value()) + if (!v.has_value()){ out = nullptr; - out = v.value().GetRaw(); + } else { + out = v.value().GetRaw(); + } ) } \ No newline at end of file