diff --git a/docs/changes.txt b/docs/changes.txt index 43013289be..a80274f466 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -107,6 +107,8 @@ Changes in behaviour not resulting in compilation errors - wxGetInstallPrefix() now returns wxString. +- wxChoice::GetString() now consistently asserts when passed an invalid index. + Changes in behaviour which may result in build errors ----------------------------------------------------- diff --git a/interface/wx/ctrlsub.h b/interface/wx/ctrlsub.h index 68fb7f8980..e246e6a26c 100644 --- a/interface/wx/ctrlsub.h +++ b/interface/wx/ctrlsub.h @@ -51,11 +51,14 @@ public: /** Returns the label of the item with the given index. + The index must be valid, i.e. less than the value returned by + GetCount(), otherwise an assert is triggered. Notably, this function + can't be called if the control is empty. + @param n The zero-based index. - @return The label of the item or an empty string if the position was - invalid. + @return The label of the item. */ virtual wxString GetString(unsigned int n) const = 0;