aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/SendTimelinePacket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/SendTimelinePacket.cpp')
-rw-r--r--src/profiling/SendTimelinePacket.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/profiling/SendTimelinePacket.cpp b/src/profiling/SendTimelinePacket.cpp
index b749b5dc72..2ca5f5470b 100644
--- a/src/profiling/SendTimelinePacket.cpp
+++ b/src/profiling/SendTimelinePacket.cpp
@@ -64,9 +64,13 @@ void SendTimelinePacket::ReserveBuffer()
m_WriteBuffer = m_BufferManager.Reserve(MAX_METADATA_PACKET_LENGTH, reserved);
// Check if there is enough space in the buffer
- if (m_WriteBuffer == nullptr || reserved < m_Offset)
+ if (m_WriteBuffer == nullptr)
+ {
+ throw BufferExhaustion("No free buffers left", CHECK_LOCATION());
+ }
+ if (reserved < m_Offset)
{
- throw BufferExhaustion("No space left on buffer", CHECK_LOCATION());
+ throw BufferExhaustion("Reserved space too small for use", CHECK_LOCATION());
}
if (m_DirectoryPackage)