Skip to content

Commit 7f43dad

Browse files
committed
background: fix crash on reset
Fixes #219
1 parent ded1b89 commit 7f43dad

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/background/background.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ WayfireBackground::WayfireBackground(WayfireShellApp *app, WayfireOutput *output
321321
});
322322
}
323323

324+
WayfireBackground::~WayfireBackground()
325+
{
326+
reset_background();
327+
}
328+
324329
class WayfireBackgroundApp : public WayfireShellApp
325330
{
326331
std::map<WayfireOutput*, std::unique_ptr<WayfireBackground>> backgrounds;

src/background/background.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ class WayfireBackground
7171
public:
7272
WayfireBackground(WayfireShellApp *app, WayfireOutput *output);
7373
bool change_background();
74+
~WayfireBackground();
7475
};

0 commit comments

Comments
 (0)