!4022 Fix CrashCallback Crash if Method Cannot be Found

Merge pull request !4022 from 李晨帅/master
This commit is contained in:
openharmony_ci 2023-05-08 13:40:10 +00:00 committed by Gitee
commit fc8d510053
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -192,7 +192,9 @@ void CrashCallback(char *buf __attribute__((unused)), size_t len __attribute__((
Method *method = frame.CheckAndGetMethod();
while (method == nullptr && !frame.Done()) {
frame.Advance();
method = frame.CheckAndGetMethod();
if (!frame.Done()) {
method = frame.CheckAndGetMethod();
}
}
std::string faultInfo;
if (method != nullptr) {