* CircularBuffer is now save to use even if the buffer allocation failed. This
fixes bug #3985. * This happened as ViewHistory::Update() can obviously be called before the view is really layouted. Therefore it now restricts the view size to 16384. * Since the Update() happens in Draw(), it looks like this is actually a problem of our layout engine (as the size is computed via BView::Frame()). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30967 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -225,6 +225,11 @@ void
|
||||
ViewHistory::Update(DataHistory* history, int32 width, int32 resolution,
|
||||
bigtime_t toTime, bigtime_t step, bigtime_t refresh)
|
||||
{
|
||||
if (width > 16384) {
|
||||
// ignore this - it seems the view hasn't been layouted yet
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if we need to invalidate the existing values
|
||||
if ((int32)fValues.Size() != width
|
||||
|| fResolution != resolution
|
||||
|
||||
Reference in New Issue
Block a user