From ffbc6879ce63c1a679288eaf2e02314a41661d3a Mon Sep 17 00:00:00 2001 From: Qi Cui Date: Sat, 18 Nov 2017 23:02:06 -0500 Subject: [PATCH] preview stage won't have the metadata populated, so protect NPE --- main/src/com/google/refine/commands/row/GetRowsCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/src/com/google/refine/commands/row/GetRowsCommand.java b/main/src/com/google/refine/commands/row/GetRowsCommand.java index 8feb8c5f4..32b088660 100644 --- a/main/src/com/google/refine/commands/row/GetRowsCommand.java +++ b/main/src/com/google/refine/commands/row/GetRowsCommand.java @@ -180,7 +180,9 @@ public class GetRowsCommand extends Command { } // metadata refresh for row mode and record mode - project.getMetadata().setRowCount(project.rows.size()); + if (project.getMetadata() != null) { + project.getMetadata().setRowCount(project.rows.size()); + } } catch (Exception e) { respondException(response, e); }