diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2014-12-08 10:59:23 +0200 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2015-01-09 21:40:37 +0100 |
commit | 076148c7dd9de01eb1224e20223d44f5c357ed6b (patch) | |
tree | 58afb28700839d2a1f44d0f5acb365bc0dedd8da /tests | |
parent | f496c7186ca358f549e3aa32ac862a6f66011db6 (diff) |
QRingBuffer: retrieve pointer to data more carefully
An empty ring buffer always has a pre-cached byte array in its
container. In this case size() indicates that no data is
available, but readPointer() tries to resolve this byte array.
To avoid an illegal pointer as a result, return Q_NULLPTR instead.
Change-Id: Icc5f08f071a8f02a14c112b6e1adbe5373bd9466
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions