File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -408,18 +408,21 @@ bool ThreadPlanStepInRange::FrameMatchesAvoidCriteria() {
408
408
StackFrame *frame = GetThread ().GetStackFrameAtIndex (0 ).get ();
409
409
410
410
// Check the library list first, as that's cheapest:
411
+ bool libraries_say_avoid = false ;
412
+
411
413
FileSpecList libraries_to_avoid (GetThread ().GetLibrariesToAvoid ());
412
414
size_t num_libraries = libraries_to_avoid.GetSize ();
413
- bool libraries_say_avoid = false ;
414
- SymbolContext sc (frame->GetSymbolContext (eSymbolContextModule));
415
- FileSpec frame_library (sc.module_sp ->GetFileSpec ());
416
-
417
- if (frame_library) {
418
- for (size_t i = 0 ; i < num_libraries; i++) {
419
- const FileSpec &file_spec (libraries_to_avoid.GetFileSpecAtIndex (i));
420
- if (FileSpec::Equal (file_spec, frame_library, false )) {
421
- libraries_say_avoid = true ;
422
- break ;
415
+ if (num_libraries > 0 ) {
416
+ SymbolContext sc (frame->GetSymbolContext (eSymbolContextModule));
417
+ FileSpec frame_library (sc.module_sp ->GetFileSpec ());
418
+
419
+ if (frame_library) {
420
+ for (size_t i = 0 ; i < num_libraries; i++) {
421
+ const FileSpec &file_spec (libraries_to_avoid.GetFileSpecAtIndex (i));
422
+ if (FileSpec::Equal (file_spec, frame_library, false )) {
423
+ libraries_say_avoid = true ;
424
+ break ;
425
+ }
423
426
}
424
427
}
425
428
}
You can’t perform that action at this time.
0 commit comments