mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 17:14:21 +01:00
fix(columns): prevent crash when switching to account with no columns
This commit is contained in:
@@ -191,6 +191,9 @@ impl Columns {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn column_mut(&mut self, ind: usize) -> &mut Column {
|
pub fn column_mut(&mut self, ind: usize) -> &mut Column {
|
||||||
|
if self.columns.is_empty() {
|
||||||
|
self.new_column_picker();
|
||||||
|
}
|
||||||
&mut self.columns[ind]
|
&mut self.columns[ind]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user