mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 14:58:11 +08:00
Fix crash from overflowing values given to NumberInput widgets (#1377)
* Added hints for brush tool size * Added hints for brush tool size * Solved the user being able to crash the editor by overflowing NumberInputs
This commit is contained in:
committed by
Keavon Chambers
parent
1c11ebcc4e
commit
fd338c945f
@@ -183,7 +183,7 @@ impl<F: Fn(&MessageDiscriminant) -> Vec<KeysGroup>> MessageHandler<LayoutMessage
|
||||
panic!("Invalid string found when updating `NumberInput`")
|
||||
}
|
||||
},
|
||||
_ => panic!("Invalid type found when updating `NumberInput`"),
|
||||
_ => {} // If it's some other type we could just ignore it and leave the value as is
|
||||
},
|
||||
Widget::OptionalInput(optional_input) => {
|
||||
let update_value = value.as_bool().expect("OptionalInput update was not of type: bool");
|
||||
|
||||
Reference in New Issue
Block a user