Skip to content

Commit

Permalink
[window] Clear screen callbacks before deletion of window_device
Browse files Browse the repository at this point in the history
Tentative fix for #1484
  • Loading branch information
jcelerier committed Oct 28, 2023
1 parent 252559b commit feed5f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/score-plugin-gfx/Gfx/WindowDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ class window_device : public ossia::net::device_base
public:
~window_device()
{
m_screen->onMouseMove = [](QPointF, QPointF) {};
m_screen->onTabletMove = [](QTabletEvent*) {};
m_screen->onKey = [](int, const QString&) {};
m_protocol->stop();

{
Expand All @@ -68,6 +71,7 @@ class window_device : public ossia::net::device_base

m_protocol.reset();
}

window_device(std::unique_ptr<ossia::net::protocol_base> proto, std::string name)
: ossia::net::device_base{std::move(proto)}
, m_screen{createScreenNode()}
Expand Down

0 comments on commit feed5f4

Please sign in to comment.