diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index 06768cf56..7738e5ded 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -39,7 +39,7 @@ void ProfilePanel::cleanup () delete partialProfileDlg; } -ProfilePanel::ProfilePanel () : storedPProfile(nullptr), lastFilename(""), imagePath("") +ProfilePanel::ProfilePanel () : storedPProfile(nullptr), lastFilename(""), imagePath(""), lastSavedPSE(nullptr) { tpc = nullptr; @@ -128,6 +128,7 @@ ProfilePanel::~ProfilePanel () delete profileFillModeOnImage; delete profileFillModeOffImage; + delete lastSavedPSE; } bool ProfilePanel::isCustomSelected() @@ -171,7 +172,7 @@ Gtk::TreeIter ProfilePanel::addCustomRow() Gtk::TreeIter ProfilePanel::addLastSavedRow() { - const ProfileStoreEntry *lastSavedPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"), PSET_FILE, 0, 0); + lastSavedPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"), PSET_FILE, 0, 0); Gtk::TreeIter newEntry = profiles->addRow(lastSavedPSE); return newEntry; } diff --git a/rtgui/profilepanel.h b/rtgui/profilepanel.h index 72c9db36b..fb3fa0a18 100644 --- a/rtgui/profilepanel.h +++ b/rtgui/profilepanel.h @@ -42,6 +42,7 @@ private: RTImage *profileFillModeOffImage; Gtk::ToggleButton* fillMode; Gtk::TreeIter currRow; + ProfileStoreEntry *lastSavedPSE; void profileFillModeToggled (); bool isCustomSelected ();