diff options
Diffstat (limited to 'charselect.cpp')
| -rw-r--r-- | charselect.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/charselect.cpp b/charselect.cpp index 959a3649..822ea78b 100644 --- a/charselect.cpp +++ b/charselect.cpp @@ -175,6 +175,15 @@ void Courtroom::put_button_in_place(int starting, int chars_on_this_page) void Courtroom::character_loading_finished() { + // Zeroeth, we'll clear any leftover characters from previous server visits. + if (ui_char_button_list.size() > 0) + { + foreach (AOCharButton* item, ui_char_button_list) { + delete item; + } + ui_char_button_list.clear(); + } + // First, we'll make all the character buttons in the very beginning. // We also hide them all, so they can't be accidentally clicked. // Later on, we'll be revealing buttons as we need them. |
