diff options
Diffstat (limited to 'src/text_input_stream.c')
-rw-r--r-- | src/text_input_stream.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/text_input_stream.c b/src/text_input_stream.c index fd402590e..3836430c7 100644 --- a/src/text_input_stream.c +++ b/src/text_input_stream.c @@ -57,6 +57,7 @@ text_input_stream_free(struct text_input_stream *tis) const char * text_input_stream_read(struct text_input_stream *tis) { + GError *error = NULL; void *dest; const char *src, *p; size_t length, nbytes; @@ -67,9 +68,15 @@ text_input_stream_read(struct text_input_stream *tis) do { dest = fifo_buffer_write(tis->buffer, &length); if (dest != NULL) { - nbytes = input_stream_read(tis->is, dest, length); + nbytes = input_stream_read(tis->is, dest, length, + &error); if (nbytes > 0) fifo_buffer_append(tis->buffer, nbytes); + else if (error != NULL) { + g_warning("%s", error->message); + g_error_free(error); + return NULL; + } } src = fifo_buffer_read(tis->buffer, &length); |