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:
Berthold Stoeger 2019-08-24 13:42:49 +02:00 committed by Dirk Hohndel
parent e6cd4f8ae5
commit 97380d6a36

View file

@ -690,7 +690,7 @@ PasteState::PasteState(dive *dIn, const dive *data, dive_components what) : d(dI
tags(nullptr)
{
memset(&cylinders[0], 0, sizeof(cylinders));
clear_weightsystem_table(&weightsystems);
memset(&weightsystems, 0, sizeof(weightsystems));
if (what.notes)
notes = data->notes;
if (what.divemaster)