Skip to content

Commit

Permalink
fix: crash on startup if "cfg/render_api.udm" does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Silverlan committed Nov 12, 2024
1 parent bd87de1 commit c2dde9e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/client/src/c_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,12 @@ bool CEngine::Initialize(int argc, char *argv[])
contextCreateInfo.height = 1024;
contextCreateInfo.windowless = g_windowless;

auto renderApiData = udm::Data::Load("cfg/render_api.udm");
std::shared_ptr<udm::Data> renderApiData {};
try {
renderApiData = udm::Data::Load("cfg/render_api.udm");
}
catch(const udm::Exception &e) {
}
if(renderApiData) {
auto &renderAPI = GetRenderAPI();
auto data = renderApiData->GetAssetData().GetData();
Expand Down

0 comments on commit c2dde9e

Please sign in to comment.