projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hide tree root on wxMSW in wxHtmlHelpController
[wxWidgets.git]
/
src
/
common
/
statbar.cpp
diff --git
a/src/common/statbar.cpp
b/src/common/statbar.cpp
index bd3a277d88e0fbba791ab95bd9ed61ab7f62cec3..fbea0399796eebdfb15db33b2dc2d257a4c29bc6 100644
(file)
--- a/
src/common/statbar.cpp
+++ b/
src/common/statbar.cpp
@@
-127,12
+127,16
@@
wxArrayInt wxStatusBarBase::CalculateAbsWidths(wxCoord widthTotal) const
if ( m_statusWidths == NULL )
{
if ( m_statusWidths == NULL )
{
- // default: all fields have the same width
- int nWidth = widthTotal / m_nFields;
- for ( int i = 0; i < m_nFields; i++ )
+ if ( m_nFields )
{
{
- widths.Add(nWidth);
+ // default: all fields have the same width
+ int nWidth = widthTotal / m_nFields;
+ for ( int i = 0; i < m_nFields; i++ )
+ {
+ widths.Add(nWidth);
+ }
}
}
+ //else: we're empty anyhow
}
else // have explicit status widths
{
}
else // have explicit status widths
{