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,
updated_time,
} => {
let current_side = shared
.game_state
.borrow()
.get_networked_current_side()
.expect("Should be Networked mode");
let current_side = shared.game_state.borrow().get_networked_current_side();
let current_side = if let Some(side) = current_side {
side
} else {
return true;
};
if let Some(emote_string) = received_emote {
if let Ok(emote_enum) = EmoteEnum::try_from(emote_string.as_str()) {
append_to_info_text(