File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -285,8 +285,10 @@ static gboolean unset_bg(gpointer data) {
285285}
286286
287287static void sample_triggered (DrMrUi * ui , int si ) {
288- gtk_image_set_from_pixbuf (GTK_IMAGE (ui -> notify_leds [si ]),led_on_pixbuf );
289- g_timeout_add (200 ,unset_bg ,ui -> notify_leds [si ]);
288+ if (ui -> notify_leds && si < ui -> samples ) {
289+ gtk_image_set_from_pixbuf (GTK_IMAGE (ui -> notify_leds [si ]),led_on_pixbuf );
290+ g_timeout_add (200 ,unset_bg ,ui -> notify_leds [si ]);
291+ }
290292}
291293
292294static const char * nstrs = "C C#D D#E F F#G G#A A#B " ;
@@ -337,6 +339,7 @@ static gboolean kit_callback(gpointer data) {
337339 notify_leds = ui -> notify_leds ;
338340 gain_sliders = ui -> gain_sliders ;
339341 pan_sliders = ui -> pan_sliders ;
342+ ui -> samples = 0 ;
340343 ui -> notify_leds = NULL ;
341344 ui -> gain_sliders = NULL ;
342345 ui -> pan_sliders = NULL ;
You can’t perform that action at this time.
0 commit comments