Fix crash bug

This commit is contained in:
Stephen Seo 2022-05-06 11:32:20 +09:00
parent 59b2bc34fb
commit 090b8bbd30
1 changed files with 7 additions and 5 deletions

View File

@ -1541,11 +1541,13 @@ impl Component for Wrapper {
received_emote, received_emote,
updated_time, updated_time,
} => { } => {
let current_side = shared let current_side = shared.game_state.borrow().get_networked_current_side();
.game_state let current_side = if let Some(side) = current_side {
.borrow() side
.get_networked_current_side() } else {
.expect("Should be Networked mode"); return true;
};
if let Some(emote_string) = received_emote { if let Some(emote_string) = received_emote {
if let Ok(emote_enum) = EmoteEnum::try_from(emote_string.as_str()) { if let Ok(emote_enum) = EmoteEnum::try_from(emote_string.as_str()) {
append_to_info_text( append_to_info_text(