diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-24 13:42:49 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-08-24 14:00:06 -0700 |
commit | 97380d6a36e59b24416077dcf7882a17f8d5a649 (patch) | |
tree | 71a9557caa2620de1593334fdb483bd5ba563294 /desktop-widgets/command_edit.cpp | |
parent | e6cd4f8ae5d8b0bbc8e517b88d4ddc6045657227 (diff) | |
download | subsurface-97380d6a36e59b24416077dcf7882a17f8d5a649.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/command_edit.cpp')
-rw-r--r-- | desktop-widgets/command_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/command_edit.cpp b/desktop-widgets/command_edit.cpp index 16fc4034e..74cffb177 100644 --- a/desktop-widgets/command_edit.cpp +++ b/desktop-widgets/command_edit.cpp @@ -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) |