From 1230a0e7cebdba78298002f6ea445f293e642ceb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 4 May 2019 01:47:16 -0400 Subject: core/frontend/emu_window: Make GraphicsContext's destructor virtual This class is used in a polymorphic context, so destruction of the context will lead to undefined behavior if the destructor isn't virtual. --- src/core/frontend/emu_window.cpp | 2 ++ src/core/frontend/emu_window.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp index 1320bbe77..eda466a5d 100644 --- a/src/core/frontend/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp @@ -10,6 +10,8 @@ namespace Core::Frontend { +GraphicsContext::~GraphicsContext() = default; + class EmuWindow::TouchState : public Input::Factory, public std::enable_shared_from_this { public: diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index 70a522556..e2c290dc1 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h @@ -19,6 +19,8 @@ namespace Core::Frontend { */ class GraphicsContext { public: + virtual ~GraphicsContext(); + /// Makes the graphics context current for the caller thread virtual void MakeCurrent() = 0; -- cgit v1.2.3