Skip to content

Commit

Permalink
defend against missing names in parts of completion system
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Apr 7, 2016
1 parent 4e50a02 commit 99c9db6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cpp/session/modules/SessionRCompletions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,9 @@ assign(x = ".rs.acCompletionTypes",
names(x[[interface]])
})

if (is.null(names(dynRoutineNames)))
return(.rs.emptyCompletions())

dynResults <- .rs.namedVectorAsList(dynRoutineNames)
dynIndices <- .rs.fuzzyMatches(dynResults$values, token)

Expand Down Expand Up @@ -2434,7 +2437,7 @@ assign(x = ".rs.acCompletionTypes",
}

# if we have import completions, use them
if (length(importCompletions))
if (length(importCompletions) && !is.null(names(importCompletions)))
{
importCompletionsList <- .rs.namedVectorAsList(importCompletions)

Expand Down

0 comments on commit 99c9db6

Please sign in to comment.