Skip to content

Commit a3fd2c5

Browse files
cheldtperexg
authored andcommitted
hdspmixer: fix null pointer dereference in HDSPMixerWindow:handler_cb
Closes: #42 Signed-off-by: Christian Heldt <[email protected]> Signed-off-by: Jaroslav Kysela <[email protected]>
1 parent 4b4886b commit a3fd2c5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

hdspmixer/src/HDSPMixerWindow.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,15 @@ static int handler_cb(int event)
274274
{
275275
HDSPMixerWindow *w = NULL;
276276
Fl_Window *fl_win = Fl::first_window();
277-
while (1) {
278-
if (fl_win->label()) {
279-
if (strncmp("HDSPMixer", fl_win->label(), 9) == 0) {
280-
w = (HDSPMixerWindow *)fl_win;
281-
break;
277+
while (fl_win) {
278+
if (fl_win->label()) {
279+
if (strncmp("HDSPMixer", fl_win->label(), 9) == 0) {
280+
w = (HDSPMixerWindow *)fl_win;
281+
break;
282+
}
282283
}
284+
fl_win = Fl::next_window(fl_win);
283285
}
284-
if ((fl_win = Fl::next_window(fl_win))) return 0;
285-
}
286286
if (!w) return 0;
287287
int key = Fl::event_key();
288288
switch (event) {

0 commit comments

Comments
 (0)