mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-11 13:26:34 +00:00
Prevent 'dereference before null check'
This commit is contained in:
parent
b9104f38b8
commit
aa47903520
@ -69,6 +69,8 @@ void task_file_load_handler(retro_task_t *task)
|
||||
{
|
||||
nbio_handle_t *nbio = (nbio_handle_t*)task->state;
|
||||
|
||||
if (nbio)
|
||||
{
|
||||
switch (nbio->status)
|
||||
{
|
||||
case NBIO_STATUS_INIT:
|
||||
@ -76,6 +78,7 @@ void task_file_load_handler(retro_task_t *task)
|
||||
{
|
||||
const char *fullpath = nbio->path;
|
||||
struct nbio_t *handle = nbio_open(fullpath, NBIO_READ);
|
||||
|
||||
if (handle)
|
||||
{
|
||||
nbio->handle = handle;
|
||||
@ -127,6 +130,7 @@ void task_file_load_handler(retro_task_t *task)
|
||||
task_set_finished(task, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (task_get_cancelled(task))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user