mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Desktop: fix crash on copy & paste
The constructor of PasteState was clearing an uninitialized weightsystem-table. Very silly. Initialize it instead. Fixes #2253 Reported-by: Stefan Fuchs <sfuchs@gmx.de> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e6cd4f8ae5
commit
97380d6a36
1 changed files with 1 additions and 1 deletions
|
@ -690,7 +690,7 @@ PasteState::PasteState(dive *dIn, const dive *data, dive_components what) : d(dI
|
||||||
tags(nullptr)
|
tags(nullptr)
|
||||||
{
|
{
|
||||||
memset(&cylinders[0], 0, sizeof(cylinders));
|
memset(&cylinders[0], 0, sizeof(cylinders));
|
||||||
clear_weightsystem_table(&weightsystems);
|
memset(&weightsystems, 0, sizeof(weightsystems));
|
||||||
if (what.notes)
|
if (what.notes)
|
||||||
notes = data->notes;
|
notes = data->notes;
|
||||||
if (what.divemaster)
|
if (what.divemaster)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue