mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix progress bar during libdivecomputer imports
As reported by Mauro Dreissig, the progress bar doesn't work and causes a SIGSEGV due to a missing allocation. The code broke when Dirk separated out the GUI from the core code, and I hadn't tried divecomputer downloads since. Reported-by: Mauro Dreissig <mukadr@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
15463fdeb2
commit
c0adfdc41b
3 changed files with 4 additions and 4 deletions
|
@ -369,7 +369,7 @@ static void event_cb(device_t *device, device_event_t event, const void *data, v
|
|||
printf("Event: waiting for user action\n");
|
||||
break;
|
||||
case DEVICE_EVENT_PROGRESS:
|
||||
update_progressbar(devdata->progress,
|
||||
update_progressbar(&devdata->progress,
|
||||
(double) progress->current / (double) progress->maximum);
|
||||
break;
|
||||
case DEVICE_EVENT_DEVINFO:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue