From 9956daf4ec363fd4e213a7a9e544c36aef72a907 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Thu, 14 Jul 2011 12:16:28 +0000 Subject: fix NPE when context is null --- gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java index 1e2abced..d6c158ca 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java @@ -498,7 +498,7 @@ public class GQuery implements Lazy { engine.impl : new SelectorEngineCssToXPath(); } } - NodeList n = impl.select(selector, context); + NodeList n = impl.select(selector, context == null ? document : context); JsNodeArray res = copyNodeList(n); currentSelector = selector; -- cgit v1.2.3