diff --git a/src/tsd/GraphHandler.java b/src/tsd/GraphHandler.java index 2af125ede..9d8ae2c32 100644 --- a/src/tsd/GraphHandler.java +++ b/src/tsd/GraphHandler.java @@ -204,10 +204,12 @@ private void doGraph(final TSDB tsdb, final HttpQuery query) } options = query.getQueryStringParams("o"); - for (int i = 0; i < options.size(); i++) { - if (!allow_list.contains(options.get(i))) { - throw new BadRequestException("Query option at index " + i - + " was not in the allow list."); + if (!(options == null)) { + for (int i = 0; i < options.size(); i++) { + if (!allow_list.contains(options.get(i))) { + throw new BadRequestException("Query option at index " + i + + " was not in the allow list."); + } } } }