From aeb6a037edc7351bd7e5f0e70212d3c0fbd8f448 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 1 May 2020 10:42:54 -0400 Subject: [PATCH 1/2] applets/mii_selector: Make destructor virtual Prevents undefined behavior when destroying derived classes through a base class pointer. --- src/core/frontend/applets/mii_selector.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/frontend/applets/mii_selector.h b/src/core/frontend/applets/mii_selector.h index 588bc0c5bd..ae63e359af 100644 --- a/src/core/frontend/applets/mii_selector.h +++ b/src/core/frontend/applets/mii_selector.h @@ -29,6 +29,7 @@ struct MiiSelectorData { class MiiSelector { public: + virtual ~MiiSelector() = default; virtual void Setup(const MiiSelectorConfig& config) { this->config = MiiSelectorConfig(config); } From 89eeb64854ecce7750c584a144fe28cdfc1f5474 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 1 May 2020 10:44:28 -0400 Subject: [PATCH 2/2] applets/swkbd: Make destructor virtual Prevents undefined behavior when destroying a derived class through a base class pointer. --- src/core/frontend/applets/swkbd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/frontend/applets/swkbd.h b/src/core/frontend/applets/swkbd.h index 1ca1858cc7..757130be46 100644 --- a/src/core/frontend/applets/swkbd.h +++ b/src/core/frontend/applets/swkbd.h @@ -82,6 +82,8 @@ enum class ValidationError { class SoftwareKeyboard { public: + virtual ~SoftwareKeyboard() = default; + /** * Executes the software keyboard, configured with the given parameters. */