Search
lxdream.org :: lxdream :: r628:bd46e2c4c479
lxdream 0.9.1
released Jun 29
Download Now
changeset628:bd46e2c4c479
parent627:c218b062a843
child629:2811e8a2debf
authornkeynes
dateFri Feb 08 00:59:15 2008 +0000 (16 years ago)
Fix premature deletion of the old device when changing devices
src/gtkui/ctrl_dlg.c
1.1 --- a/src/gtkui/ctrl_dlg.c Fri Feb 08 00:58:41 2008 +0000
1.2 +++ b/src/gtkui/ctrl_dlg.c Fri Feb 08 00:59:15 2008 +0000
1.3 @@ -225,7 +225,9 @@
1.4 assert(devclz != NULL);
1.5 if( data->new_device != NULL ) {
1.6 if( data->new_device->device_class != devclz ) {
1.7 - data->new_device->destroy(data->new_device);
1.8 + if( data->new_device != data->old_device ) {
1.9 + data->new_device->destroy(data->new_device);
1.10 + }
1.11 data->new_device = maple_new_device(devname);
1.12 }
1.13 } else {
.