Skip to content

Commit

Permalink
Fix for NPE in custom filter activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Su committed Sep 14, 2010
1 parent 26488ec commit 457059c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void saveAndView() {
for(int i = 0; i < adapter.getCount(); i++) {
CriterionInstance instance = adapter.getItem(i);
String value = instance.getValueFromCriterion();
if(value == null && instance.criterion.sql.contains("?"))
if(value == null && instance.criterion.sql != null && instance.criterion.sql.contains("?"))
continue;

String title = instance.getTitleFromCriterion();
Expand Down Expand Up @@ -414,7 +414,7 @@ void updateList() {
for(int i = 0; i < adapter.getCount(); i++) {
CriterionInstance instance = adapter.getItem(i);
String value = instance.getValueFromCriterion();
if(value == null && instance.criterion.sql.contains("?"))
if(value == null && instance.criterion.sql != null && instance.criterion.sql.contains("?"))
continue;

switch(instance.type) {
Expand Down

0 comments on commit 457059c

Please sign in to comment.