diff --git a/src/olympic/turbine/include/turbine/context.hpp b/src/olympic/turbine/include/turbine/context.hpp index 05f39b76..7d513c4f 100644 --- a/src/olympic/turbine/include/turbine/context.hpp +++ b/src/olympic/turbine/include/turbine/context.hpp @@ -99,12 +99,15 @@ template [[nodiscard]] T *applicationData(Context &ctx) noexcept { auto const raw = applicationDataRaw(ctx); + if (!raw) [[unlikely]] { + return nullptr; + } #ifdef OX_BARE_METAL auto const out = static_cast*>(raw); #else auto const out = dynamic_cast*>(raw); #endif - oxAssert(out || !raw, "Cast failed - wrong type"); + oxAssert(out, "Cast failed - wrong type"); return out->data; }