This might be causing a divide by 0 error because all the sizes are 0...

This commit is contained in:
Ray Greenwell
2012-03-15 21:34:32 +00:00
parent cbf49d87b8
commit 828a4638b0
@@ -48,8 +48,10 @@ public class MetaProgressObserver implements ProgressObserver
// documentation inherited from interface // documentation inherited from interface
public void progress (int percent) public void progress (int percent)
{ {
if (_elementSize > 0) {
_target.progress((int)((_accum + (percent * _elementSize)) / _totalSize)); _target.progress((int)((_accum + (percent * _elementSize)) / _totalSize));
} }
}
protected ProgressObserver _target; protected ProgressObserver _target;
protected long _totalSize, _accum, _elementSize; protected long _totalSize, _accum, _elementSize;