Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Commit 1901686

Browse files
authored
Merge pull request #261 from TeamWisp/feature_shader_reloading
Shader reloading no longer some times crashes the app.
2 parents 2bdb6be + ba62469 commit 1901686

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/d3d12/d3d12_renderer.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,15 @@ namespace wr
538538
}
539539
else
540540
{
541-
std::cout << std::get<std::string>(shader_error) << std::endl;
542-
LOGC(std::get<std::string>(shader_error));
541+
try
542+
{
543+
LOGC(std::get<std::string>(shader_error));
544+
}
545+
catch(std::exception e)
546+
{
547+
LOGW("Seems like FMT failed to format the error message. Using cout instead.");
548+
std::cerr << std::get<std::string>(shader_error) << std::endl;
549+
}
543550
}
544551
}
545552
}

0 commit comments

Comments
 (0)