X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e25cdb868f00e6a3d05c994f6fddacf4f24e5350..482ee3976f3008e44bd6352b990c8b7a99669754:/src/common/dbtable.cpp diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index cf3860dfcf..e11ff65602 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -2118,6 +2118,9 @@ void wxDbTable::SetColDefs(UWORD index, const wxString &fieldName, int dataType, SWORD cType, int size, bool keyField, bool upd, 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 return;