mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site: close dive site edit widget when dive site is deleted
The application could be crashed by 1) Create dive site 2) Edit dive site 3) Undo until dive site is removed 4) Continue editing now non-existing dive site Therefore, hook into the dive-site-deleted signal and if the currently edited dive site is deleted, close the widget. When closing the widget, make sure that the potentially dangling pointer is reset to zero so that there is no other potential use-after-free bug. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4479ccf8f3
commit
e3cd0891d3
3 changed files with 14 additions and 0 deletions
|
@ -34,6 +34,7 @@ public slots:
|
|||
private slots:
|
||||
void updateLabels();
|
||||
void diveSiteChanged(struct dive_site *ds, int field);
|
||||
void diveSiteDeleted(struct dive_site *ds, int);
|
||||
void unitsChanged();
|
||||
private:
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue