vnc: fix crashes when disabling --calc
This commit is contained in:
parent
a3864fad21
commit
e7ffe36061
|
@ -44,8 +44,10 @@ static struct app app = { 0 };
|
|||
static void cleanup(void)
|
||||
{
|
||||
/* Wait for libusb to settle down */
|
||||
while(fxlink_device_list_interrupt(&app.devices))
|
||||
libusb_handle_events(app.libusb_ctx);
|
||||
if(app.libusb_ctx) {
|
||||
while(fxlink_device_list_interrupt(&app.devices))
|
||||
libusb_handle_events(app.libusb_ctx);
|
||||
}
|
||||
|
||||
for(int i = 0; i < MONITOR_COUNT; i++) {
|
||||
struct monitor *mon = app.monitors[i];
|
||||
|
@ -420,9 +422,11 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* Run libusb's event loop */
|
||||
struct timeval zero_tv = { 0 };
|
||||
libusb_handle_events_timeout(app.libusb_ctx, &zero_tv);
|
||||
fxlink_device_list_refresh(&app.devices);
|
||||
if(app.libusb_ctx) {
|
||||
struct timeval zero_tv = { 0 };
|
||||
libusb_handle_events_timeout(app.libusb_ctx, &zero_tv);
|
||||
fxlink_device_list_refresh(&app.devices);
|
||||
}
|
||||
|
||||
/* Update monitors so they can attach to calculators */
|
||||
for(int i = 0; i < MONITOR_COUNT; i++) {
|
||||
|
|
Loading…
Reference in New Issue