obs-signal-handler: Fix possible crash

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-02-14 07:31:30 +01:00
parent 326fa68d9f
commit baf265fd5b
1 changed files with 4 additions and 4 deletions

View File

@ -47,8 +47,8 @@ namespace obs {
static void handle_signal(void* ptr, calldata* cd) noexcept
try {
auto p = reinterpret_cast<signal_handler<std::shared_ptr<obs_source_t>>&>(ptr);
p.event(p._keepalive, cd);
auto p = reinterpret_cast<signal_handler<std::shared_ptr<obs_source_t>>*>(ptr);
p->event(p->_keepalive, cd);
} catch (...) {
}
@ -75,8 +75,8 @@ namespace obs {
static void handle_audio(void* ptr, obs_source_t*, const struct audio_data* audio_data, bool muted) noexcept
try {
auto p = reinterpret_cast<audio_signal_handler&>(ptr);
p.event(p._keepalive, audio_data, muted);
auto p = reinterpret_cast<audio_signal_handler*>(ptr);
p->event(p->_keepalive, audio_data, muted);
} catch (...) {
}