Skip to content
Snippets Groups Projects
Commit d63dd43c authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Prevent dereferencing NULL bar or cur with WIN_DYN

This would be an API violation, but we shouldn't crash about it.
parent d5a2666a
No related branches found
No related tags found
No related merge requests found
Pipeline #7604 failed
...@@ -1890,8 +1890,14 @@ int ulist(uifc_winmode_t mode, int left, int top, int width, int *cur, int *bar ...@@ -1890,8 +1890,14 @@ int ulist(uifc_winmode_t mode, int left, int top, int width, int *cur, int *bar
else else
mswait(1); mswait(1);
if(mode&WIN_DYN) { if(mode&WIN_DYN) {
save_menu_cur=*cur; if (cur)
save_menu_bar=*bar; save_menu_cur=*cur;
else
save_menu_cur = -1;
if (bar)
save_menu_bar=*bar;
else
save_menu_bar=-1;
save_menu_opts=opts; save_menu_opts=opts;
return(-2-gotkey); return(-2-gotkey);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment