mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 05:09:20 +02:00
whois: guard against a null activator
whois_event::run_() dereferenced m_activator unconditionally in every branch (this predates this PR). getvalues_event::run_() and putvalues_event::run_() already guard the same way elsewhere in this file; whois_event was missing it. Single early return covers every branch, old and new.
This commit is contained in:
@@ -1014,6 +1014,8 @@ whois_event::deserialize_( cParser &Input, scene::scratch_data &Scratchpad ) {
|
||||
void
|
||||
whois_event::run_() {
|
||||
|
||||
if( m_activator == nullptr ) { return; }
|
||||
|
||||
for( auto &target : m_targets ) {
|
||||
auto *targetcell { static_cast<TMemCell *>( std::get<scene::basic_node *>( target ) ) };
|
||||
if( targetcell == nullptr ) { continue; }
|
||||
|
||||
Reference in New Issue
Block a user