diff options
author | Gregor Bollerhey <gbsoftware@arcor.de> | 2014-01-07 23:41:17 (GMT) |
---|---|---|
committer | Jan Sucan <jan@jansucan.com> | 2020-04-05 07:47:18 (GMT) |
commit | bb0790d7945d4ed728b374409aa227dce07b0090 (patch) | |
tree | f4a88ba44629fcdb71e363dad4d0947296d78505 /src | |
parent | 173a66346b662c17e8e49bbccc6bdd412b54d262 (diff) | |
download | fluxbox-bb0790d7945d4ed728b374409aa227dce07b0090.zip fluxbox-bb0790d7945d4ed728b374409aa227dce07b0090.tar.bz2 |
XFree must not be called with 0.
Diffstat (limited to 'src')
-rw-r--r-- | src/SystemTray.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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<std::string> left, | |||
599 | // based on the parsed order list and a given window returns an | 599 | // based on the parsed order list and a given window returns an |
600 | // ordinal used to sort the tray icons. | 600 | // ordinal used to sort the tray icons. |
601 | 601 | ||
602 | std::unique_ptr<XClassHint, int(*)(void*)> | 602 | auto deleter = [](XClassHint *x){if(x) XFree(x);}; |
603 | xclasshint(XAllocClassHint(), XFree); | 603 | |
604 | std::unique_ptr<XClassHint, decltype(deleter)> | ||
605 | xclasshint(XAllocClassHint(), deleter); | ||
604 | 606 | ||
605 | if(XGetClassHint(Fluxbox::instance()->display(), | 607 | if(XGetClassHint(Fluxbox::instance()->display(), |
606 | i->window(), xclasshint.get())) | 608 | i->window(), xclasshint.get())) |