diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2010-08-07 19:29:36 +0100 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2010-08-09 00:02:30 +0100 |
commit | 7231b18a03041139cf2309634c86aed3bc15e0b5 (patch) | |
tree | b6a1218dce52c4eac0b7085957e3e004e1de5b81 /gdata/gdata-buffer.c | |
parent | 90a9933a633320089fb5995e8c5d0c5dc8fd62e6 (diff) | |
download | libgdata-7231b18a03041139cf2309634c86aed3bc15e0b5.tar.gz |
[core] Add an assertion to back up a comment
Diffstat (limited to 'gdata/gdata-buffer.c')
-rw-r--r-- | gdata/gdata-buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdata/gdata-buffer.c b/gdata/gdata-buffer.c index 8d73a281..f75bcf7c 100644 --- a/gdata/gdata-buffer.c +++ b/gdata/gdata-buffer.c @@ -288,6 +288,8 @@ gdata_buffer_pop_data (GDataBuffer *self, guint8 *data, gsize length_requested, /* If the requested length is still > 0, it must be < chunk->length, and chunk must != NULL (if it does, the cached total_length has * been corrupted somewhere). */ if (G_LIKELY (length_remaining > 0)) { + g_assert (chunk != NULL); + /* Copy the requested data to the output */ memcpy (data, chunk->data, length_remaining); self->head_read_offset = length_remaining; |