ActivityMonitor: fixed minor issue CID 609788.

* If the circular buffer was created with a size of zero, fBuffer would
  be freed without being initialized.
This commit is contained in:
Axel Dörfler
2013-03-19 00:56:47 +01:00
parent 161400fbcc
commit bc4dd456f9
+4 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008-2009, Axel Dörfler, [email protected].
* Copyright 2008-2013, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef CIRCULAR_BUFFER_H
@@ -16,7 +16,8 @@ class CircularBuffer {
public:
CircularBuffer(size_t size)
:
fSize(0)
fSize(0),
fBuffer(NULL)
{
SetSize(size);
}
@@ -96,4 +97,5 @@ private:
Type* fBuffer;
};
#endif // CIRCULAR_BUFFER_H