Skip to content

Commit c31aa3c

Browse files
committed
Avoid ordered comparison of pointers
1 parent 22df6d7 commit c31aa3c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ui/windows7thumbbar.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void Windows7ThumbBar::HandleWinEvent(MSG* msg) {
142142
actions_.count(), buttons);
143143
if (hr != S_OK) qLog(Debug) << "Failed to add buttons" << hex << DWORD(hr);
144144
for (int i = 0; i < actions_.count(); i++) {
145-
if (buttons[i].hIcon > 0) DestroyIcon(buttons[i].hIcon);
145+
if (buttons[i].hIcon != 0) DestroyIcon(buttons[i].hIcon);
146146
}
147147
} else if (msg->message == WM_COMMAND) {
148148
const int button_id = LOWORD(msg->wParam);
@@ -169,7 +169,7 @@ void Windows7ThumbBar::ActionChanged() {
169169

170170
button->iId = i;
171171
SetupButton(action, button);
172-
if (buttons->hIcon > 0) DestroyIcon(buttons->hIcon);
172+
if (buttons->hIcon != 0) DestroyIcon(buttons->hIcon);
173173
}
174174

175175
taskbar_list->ThumbBarUpdateButtons((HWND)widget_->winId(), actions_.count(),

0 commit comments

Comments
 (0)