Return early from panel PageInner::update function if no panel_config
This fixes a potential panic if the dock or panel configs are not defined.
This commit is contained in:
parent
367d50ab2d
commit
6316c8cc17
1 changed files with 3 additions and 1 deletions
|
|
@ -324,7 +324,9 @@ impl PageInner {
|
|||
#[allow(clippy::too_many_lines)]
|
||||
pub fn update(&mut self, message: Message) {
|
||||
let helper = self.config_helper.as_ref().unwrap();
|
||||
let mut panel_config = self.panel_config.as_mut().unwrap();
|
||||
let Some(mut panel_config) = self.panel_config.as_mut() else {
|
||||
return
|
||||
};
|
||||
|
||||
match message {
|
||||
Message::AutoHidePanel(enabled) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue