diff --git a/include/wx/list.h b/include/wx/list.h index c917e02a2f..3a261249ee 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -1047,10 +1047,11 @@ private: { splice(it, l, l.begin(), l.end() ); } \ void splice(const iterator& it, name& l, const iterator& first) \ { \ - iterator tmp = first; ++tmp; \ - if(it == first || it == tmp) return; \ - insert(it, *first); \ - l.erase(first); \ + if ( it != first ) \ + { \ + insert(it, *first); \ + l.erase(first); \ + } \ } \ void remove(const_reference v) \ { DeleteObject((const_base_reference)v); } \