mirror of
https://github.com/uowuo/abaddon.git
synced 2024-11-10 06:00:10 +00:00
add iter valid check (closes #280)
This commit is contained in:
parent
e3e5b700df
commit
53ad3903ee
@ -1153,8 +1153,11 @@ bool ChannelListTree::SelectionFunc(const Glib::RefPtr<Gtk::TreeModel> &model, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto type = (*model->get_iter(path))[m_columns.m_type];
|
const auto iter = model->get_iter(path);
|
||||||
const auto id = static_cast<Snowflake>((*model->get_iter(path))[m_columns.m_id]);
|
if (!iter) return false;
|
||||||
|
|
||||||
|
const auto type = (*iter)[m_columns.m_type];
|
||||||
|
const auto id = static_cast<Snowflake>((*iter)[m_columns.m_id]);
|
||||||
// todo maybe just keep this last check?
|
// todo maybe just keep this last check?
|
||||||
if (type == RenderType::TextChannel || type == RenderType::DM || type == RenderType::Thread || (id == m_active_channel)) return true;
|
if (type == RenderType::TextChannel || type == RenderType::DM || type == RenderType::Thread || (id == m_active_channel)) return true;
|
||||||
return is_currently_selected;
|
return is_currently_selected;
|
||||||
|
Loading…
Reference in New Issue
Block a user