diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-22 01:42:51 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-22 04:12:03 +0200 |
commit | a29f310b8ad0b088860fe05a5499bccef963a503 (patch) | |
tree | 7df3abb8e3b3652bf6f7d13ac336e498c60509b9 /src/Body.cpp | |
parent | 7bf0f7107b72af01fea83a7343ce1c32e54865e9 (diff) |
Add ctrl+i to view attached images/videos to matrix posts
Diffstat (limited to 'src/Body.cpp')
-rw-r--r-- | src/Body.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index ab68a61..20911de 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -146,7 +146,7 @@ namespace QuickMedia { } BodyItem* Body::get_selected() const { - if(items.empty() || !items[selected_item]->visible) + if(selected_item < 0 || selected_item >= (int)items.size() || !items[selected_item]->visible) return nullptr; return items[selected_item].get(); } |