projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Stop some EnsureVisible() calls happening with out-of-range parameters.
[dcpomatic.git]
/
src
/
wx
/
full_language_tag_dialog.cc
diff --git
a/src/wx/full_language_tag_dialog.cc
b/src/wx/full_language_tag_dialog.cc
index 2b3aeb7debc87f8cbe41d2c4bce7a2a83433d832..a26dcc0bb81a2862ca77a2d612292e6d37effa1f 100644
(file)
--- a/
src/wx/full_language_tag_dialog.cc
+++ b/
src/wx/full_language_tag_dialog.cc
@@
-173,7
+173,7
@@
private:
{
auto search = _search->GetValue();
_list->set_search (search.ToStdString());
- if (search.Length() > 0) {
+ if (search.Length() > 0
&& _list->GetItemCount() > 0
) {
_list->EnsureVisible (0);
}
SearchChanged (_search->GetValue().ToStdString());