[libgdata] [core] Add an assertion to back up a comment
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] [core] Add an assertion to back up a comment
- Date: Sun, 8 Aug 2010 23:03:27 +0000 (UTC)
commit 7231b18a03041139cf2309634c86aed3bc15e0b5
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Aug 7 19:29:36 2010 +0100
[core] Add an assertion to back up a comment
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 8d73a28..f75bcf7 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]