diff options
author | George Hazan <ghazan@miranda.im> | 2020-09-29 13:31:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-09-29 13:31:16 +0300 |
commit | 068ea7902436478c352e83222fe2f8725c7cee92 (patch) | |
tree | b4c36dff6c4ebd6124aa1a0aa5e147a1015cdc42 /plugins/Import | |
parent | 2213089e9a46fcc5c0b67e7231de7e3370a1c02d (diff) |
Import: fix for rare crash in mcontacts import
Diffstat (limited to 'plugins/Import')
-rw-r--r-- | plugins/Import/src/mcontacts.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/Import/src/mcontacts.cpp b/plugins/Import/src/mcontacts.cpp index c9d843aa34..2def8eefce 100644 --- a/plugins/Import/src/mcontacts.cpp +++ b/plugins/Import/src/mcontacts.cpp @@ -241,6 +241,9 @@ public: STDMETHODIMP_(MEVENT) FindFirstEvent(MCONTACT) override { + if (m_events.empty()) + return 0; + m_curr = m_events.begin(); return *m_curr; } @@ -256,6 +259,9 @@ public: STDMETHODIMP_(MEVENT) FindLastEvent(MCONTACT) override { + if (m_events.empty()) + return 0; + m_curr = m_events.end(); return *m_curr; } |