]> git.saurik.com Git - wxWidgets.git/commit
Don't use uninitialized variables in wxGrid::AutoSize().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jul 2010 10:44:12 +0000 (10:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jul 2010 10:44:12 +0000 (10:44 +0000)
commit68abd97d19358a93a00e16402d3a717eeb594441
tree43f7a2dd903a0bac6b0a8453b5749dfba69e1cad
parent3dea8ba7acb49948ccda20029655fd190a306298
Don't use uninitialized variables in wxGrid::AutoSize().

The code in wxGrid::AutoSizeColOrRow() was using uninitialized col/row
variable if the grid had no rows/columns, resulting in assertion failures when
trying to automatically size the columns of an empty grid.

Do initialize them now and also remove duplicate assignments to the variables
which never change inside the loop.

Closes #12206.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/generic/grid.cpp