Added a wxASSERT_MSG in ::SetColDefs() to trap for the user sending an index that is larger than the number of columns defined for the table
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2118,6 +2118,9 @@ void wxDbTable::SetColDefs(UWORD index, const wxString &fieldName, int dataType,
|
|||||||
SWORD cType, int size, bool keyField, bool upd,
|
SWORD cType, int size, bool keyField, bool upd,
|
||||||
bool insAllow, bool derivedCol)
|
bool insAllow, bool derivedCol)
|
||||||
{
|
{
|
||||||
|
wxASSERT_MSG( index < noCols,
|
||||||
|
_T("Specified column index exceeds the maximum number of columns for this table.") );
|
||||||
|
|
||||||
if (!colDefs) // May happen if the database connection fails
|
if (!colDefs) // May happen if the database connection fails
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user