all repos — fluxbox @ bb0790d7945d4ed728b374409aa227dce07b0090

custom fork of the fluxbox windowmanager

XFree must not be called with 0.
Gregor Bollerhey gbsoftware@arcor.de
commit

bb0790d7945d4ed728b374409aa227dce07b0090

parent

173a66346b662c17e8e49bbccc6bdd412b54d262

2 files changed, 7 insertions(+), 2 deletions(-)

jump to
M .gitignore.gitignore

@@ -48,3 +48,6 @@ /testTexture

/util/fluxbox-generate_menu /util/startfluxbox /version.h + +# off source build directory +build
M src/SystemTray.ccsrc/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()))