From bb0790d7945d4ed728b374409aa227dce07b0090 Mon Sep 17 00:00:00 2001 From: Gregor Bollerhey Date: Wed, 8 Jan 2014 00:41:17 +0100 Subject: XFree must not be called with 0. --- .gitignore | 3 +++ src/SystemTray.cc | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9a25bea..132ea38 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,6 @@ Makefile.in /util/fluxbox-generate_menu /util/startfluxbox /version.h + +# off source build directory +build diff --git a/src/SystemTray.cc b/src/SystemTray.cc index 1c88836..af534f6 100644 --- a/src/SystemTray.cc +++ b/src/SystemTray.cc @@ -599,8 +599,10 @@ static int client_to_ordinal(const std::vector left, // based on the parsed order list and a given window returns an // ordinal used to sort the tray icons. - std::unique_ptr - xclasshint(XAllocClassHint(), XFree); + auto deleter = [](XClassHint *x){if(x) XFree(x);}; + + std::unique_ptr + xclasshint(XAllocClassHint(), deleter); if(XGetClassHint(Fluxbox::instance()->display(), i->window(), xclasshint.get())) -- cgit v0.11.2