mirror of https://github.com/BOINC/boinc.git
Merge pull request #1987 from AenBleidd/manager_fix_crt_assert
Manager: get rid of out_of_range exception and handle such situation …
This commit is contained in:
commit
adf2b1256f
|
@ -2109,17 +2109,10 @@ done:
|
|||
|
||||
|
||||
MESSAGE* CMainDocument::message(unsigned int i) {
|
||||
MESSAGE* pMessage = NULL;
|
||||
if (messages.messages.empty() || messages.messages.size() <= i)
|
||||
return NULL;
|
||||
|
||||
try {
|
||||
if (!messages.messages.empty())
|
||||
pMessage = messages.messages.at(i);
|
||||
}
|
||||
catch (std::out_of_range e) {
|
||||
pMessage = NULL;
|
||||
}
|
||||
|
||||
return pMessage;
|
||||
return messages.messages.at(i);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue