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