Skip to content

Commit

Permalink
TDB: Hacky workaround to some parameters being null (generics?)
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Jan 25, 2024
1 parent 694d4f3 commit 193351e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion shared/sdk/RETypeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,16 @@ std::vector<sdk::RETypeDefinition*> REMethodDefinition::get_param_types() const
auto tdb = RETypeDB::get();
std::vector<sdk::RETypeDefinition*> out{};

static const auto system_object = tdb->find_type("System.Object");

for (auto id : typeids) {
out.push_back(tdb->get_type(id));
const auto t = tdb->get_type(id);

if (t == nullptr) {
out.push_back(system_object); // TODO: this is a hack. not sure why this happens
continue;
}
out.push_back(t);
}

return out;
Expand Down

0 comments on commit 193351e

Please sign in to comment.