XFree must not be called with 0.
Gregor Bollerhey gbsoftware@arcor.de
2 files changed,
7 insertions(+),
2 deletions(-)
M
.gitignore
→
.gitignore
@@ -48,3 +48,6 @@ /testTexture
/util/fluxbox-generate_menu /util/startfluxbox /version.h + +# off source build directory +build
M
src/SystemTray.cc
→
src/SystemTray.cc
@@ -599,8 +599,10 @@ TrayWindow *i) {
// based on the parsed order list and a given window returns an // ordinal used to sort the tray icons. - std::unique_ptr<XClassHint, int(*)(void*)> - xclasshint(XAllocClassHint(), XFree); + auto deleter = [](XClassHint *x){if(x) XFree(x);}; + + std::unique_ptr<XClassHint, decltype(deleter)> + xclasshint(XAllocClassHint(), deleter); if(XGetClassHint(Fluxbox::instance()->display(), i->window(), xclasshint.get()))