We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dba06bd commit 2b43a48Copy full SHA for 2b43a48
src/main/errors.c
@@ -2361,7 +2361,6 @@ R_GetCurrentSrcref(int skip)
2361
}
2362
2363
/* If skip = NA, try current active srcref first. */
2364
-
2365
if (keep_looking) {
2366
srcref = R_getCurrentSrcref();
2367
if (srcref && !isNull(srcref))
@@ -2381,9 +2380,10 @@ R_GetCurrentSrcref(int skip)
2381
2380
/* Now get the next srcref. If skip was not NA, don't
2382
keep looking. */
2383
do {
+ if (!c) break;
2384
srcref = fixBCSrcref(c->srcref, c);
2385
c = c->nextcontext;
2386
- } while (keep_looking && c && !(srcref && !isNull(srcref)));
+ } while (keep_looking && !(srcref && !isNull(srcref)));
2387
if (!srcref)
2388
srcref = R_NilValue;
2389
return srcref;
0 commit comments