--wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, This patch makes sure Kmix wouldn't keep tabs for mixers of soundcards which were removed from the computer. Currently, if you install another soundcard, run kmix, then remove the soundcard and then run kmix again, there'll be a tab with "Invalid mixer" written inside (for the removed mixer). This patch makes sure only existing mixer devices get a tab. --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="kmix_nonexistant_mixer.patch" --- kdemultimedia/kmix/kmix.cpp 2001/07/18 10:25:27 1.111 +++ kdemultimedia/kmix/kmix.cpp 2001/08/02 21:46:37 @@ -321,10 +321,13 @@ void KMixWindow::loadConfig() } - KMixerWidget *mw = new KMixerWidget( id, mixer, mixerName, mixerNum, false, true, this ); - mw->setName( name ); - mw->loadConfig( config, *tab ); - insertMixerWidget( mw ); + // only if an actual mixer device is found for the config entry + if (mixer) { + KMixerWidget *mw = new KMixerWidget( id, mixer, mixerName, mixerNum, false, true, this ); + mw->setName( name ); + mw->loadConfig( config, *tab ); + insertMixerWidget( mw ); + } } // restore window size and position --wRRV7LY7NUeQGEoC--