Commit a1590b5ab809d3c6ef8bda37d191296d208c47cc

Authored by Matti Virkkunen
1 parent 879ff12d

Properly check the type of buddy list nodes before accessing them.

Showing 1 changed file with 2 additions and 2 deletions
libpurple/purpleline.hpp
... ... @@ -234,8 +234,8 @@ std::set<T *> PurpleLine::blist_find(std::function<bool(T *)> predicate) {
234 234 node;
235 235 node = purple_blist_node_next(node, FALSE))
236 236 {
237   - if (_blist_node_type<T>::get_account((T *)node) == acct
238   - && purple_blist_node_get_type(node) == _blist_node_type<T>::type
  237 + if (purple_blist_node_get_type(node) == _blist_node_type<T>::type
  238 + && _blist_node_type<T>::get_account((T *)node) == acct
239 239 && predicate((T *)node))
240 240 {
241 241 results.insert((T *)node);
... ...