This commit is contained in:
twinaphex 2017-05-09 07:13:47 +02:00
parent 83b0d3e412
commit da1ab24c57
1 changed files with 7 additions and 12 deletions

View File

@ -226,15 +226,10 @@ static void task_image_load_free_internal(nbio_handle_t *nbio)
static int cb_nbio_generic(nbio_handle_t *nbio, size_t *len)
{
void *ptr = NULL;
struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
void *ptr = nbio_get_ptr(nbio->handle, len);
if (!image || !image->handle)
goto error;
ptr = nbio_get_ptr(nbio->handle, len);
if (!ptr)
if (!ptr || !image || !image->handle)
goto error;
image_transfer_set_buffer_ptr(image->handle, nbio->image_type, ptr);