Skip to content

Commit

Permalink
fix: invalid quick return
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia authored and fxliang committed Sep 30, 2024
1 parent 02fdffe commit 4da2637
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WeaselDeployer/SwitcherSettingsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ LRESULT SwitcherSettingsDialog::OnOK(WORD, WORD code, HWND, BOOL&) {

LRESULT SwitcherSettingsDialog::OnSchemaListItemChanged(int, LPNMHDR p, BOOL&) {
LPNMLISTVIEW lv = reinterpret_cast<LPNMLISTVIEW>(p);
if (!loaded_ || !lv ||
lv->iItem < 0 && lv->iItem >= schema_list_.GetItemCount())
if (!loaded_ || !lv || lv->iItem < 0 ||
lv->iItem >= schema_list_.GetItemCount())
return 0;
if ((lv->uNewState & LVIS_STATEIMAGEMASK) !=
(lv->uOldState & LVIS_STATEIMAGEMASK)) {
Expand Down

0 comments on commit 4da2637

Please # to comment.