Some users are not used to tabbed GUI in instant messengers and tend to press the X button on the main conversation window, therefor closing all active chats instead of a current one. Or this can happen by an accident. There could be an option in Preferences > Chat. E.g. "Show confirmation dialog when closing multiple conversations". This could be checked/enabled by default.
Not a must, but could be handy to have a checkbox "Do not show this again" in the dialog itself, so one could disable this feature right away without having to go into Preferences.