Fix a crash when trying to show an error with bad separator.
For example, a single dot or colon at the end of the error string.
This commit is contained in:
parent
6017ecdacc
commit
a6c34bb44d
@ -138,9 +138,11 @@ static void MessageBox(const char *fmt, va_list va, bool error,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string::iterator it = description.begin();
|
if(description.length() > 0) {
|
||||||
while(isspace(*it)) it++;
|
std::string::iterator it = description.begin();
|
||||||
description = description.substr(it - description.begin());
|
while(isspace(*it)) it++;
|
||||||
|
description = description.substr(it - description.begin());
|
||||||
|
}
|
||||||
|
|
||||||
Platform::MessageDialogRef dialog = CreateMessageDialog(SS.GW.window);
|
Platform::MessageDialogRef dialog = CreateMessageDialog(SS.GW.window);
|
||||||
if (!dialog) {
|
if (!dialog) {
|
||||||
|
Loading…
Reference in New Issue
Block a user