mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
core/GUI: Fix null pointer dereference
This commit is contained in:
parent
e7537cded5
commit
55821041bf
1 changed files with 6 additions and 1 deletions
|
@ -315,6 +315,11 @@ s32 cellMsgDialogProgressBarSetMsg(u32 progressBarIndex, vm::cptr<char> msgStrin
|
||||||
{
|
{
|
||||||
cellSysutil.warning("cellMsgDialogProgressBarSetMsg(progressBarIndex=%d, msgString=%s)", progressBarIndex, msgString);
|
cellSysutil.warning("cellMsgDialogProgressBarSetMsg(progressBarIndex=%d, msgString=%s)", progressBarIndex, msgString);
|
||||||
|
|
||||||
|
if (!msgString)
|
||||||
|
{
|
||||||
|
return CELL_MSGDIALOG_ERROR_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
if (auto rsxthr = fxm::get<GSRender>())
|
if (auto rsxthr = fxm::get<GSRender>())
|
||||||
{
|
{
|
||||||
if (auto dlg2 = rsxthr->shell_get_current_dialog())
|
if (auto dlg2 = rsxthr->shell_get_current_dialog())
|
||||||
|
@ -331,7 +336,7 @@ s32 cellMsgDialogProgressBarSetMsg(u32 progressBarIndex, vm::cptr<char> msgStrin
|
||||||
return CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED;
|
return CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (progressBarIndex >= dlg->type.progress_bar_count || !msgString)
|
if (progressBarIndex >= dlg->type.progress_bar_count)
|
||||||
{
|
{
|
||||||
return CELL_MSGDIALOG_ERROR_PARAM;
|
return CELL_MSGDIALOG_ERROR_PARAM;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue