mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Attempt to prevent crashes in task_image
This commit is contained in:
parent
6708da5ec1
commit
28dedee477
@ -278,6 +278,8 @@ bool task_image_load_handler(retro_task_t *task)
|
||||
nbio_handle_t *nbio = (nbio_handle_t*)task->state;
|
||||
struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
|
||||
|
||||
if (image)
|
||||
{
|
||||
switch (image->status)
|
||||
{
|
||||
case IMAGE_STATUS_PROCESS_TRANSFER:
|
||||
@ -303,10 +305,11 @@ bool task_image_load_handler(retro_task_t *task)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( nbio->is_finished
|
||||
&& image->is_finished
|
||||
&& !task->cancelled)
|
||||
if ( (nbio && nbio->is_finished )
|
||||
&& (image && image->is_finished )
|
||||
&& (task && !task->cancelled))
|
||||
{
|
||||
task->task_data = malloc(sizeof(image->ti));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user