mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
TankBar: don't risk dereferencing stale pointers
Basically we could end up in a situation where the plotInfo is no longer valid, yet the model changes and triggers a redraw before the new data is passed into the TankBar. Instead of chasing that race condition it seemed much easier to just copy the plot_data entries and the gas information in the dive. Fixes #716 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3e4c30735c
commit
fb371c0633
2 changed files with 20 additions and 12 deletions
|
|
@ -28,8 +28,9 @@ private:
|
|||
DivePlotDataModel *dataModel;
|
||||
DiveCartesianAxis *hAxis;
|
||||
int hDataColumn;
|
||||
struct dive *dive;
|
||||
struct plot_info *pInfo;
|
||||
struct dive diveCylinderStore;
|
||||
struct plot_data *pInfoEntry;
|
||||
int pInfoNr;
|
||||
qreal yPos, height;
|
||||
QBrush air, nitrox, trimix;
|
||||
QList<QGraphicsRectItem *> rects;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue