preview stage won't have the metadata populated, so protect NPE

This commit is contained in:
Qi Cui 2017-11-18 23:02:06 -05:00
parent ae9e0af8b9
commit ffbc6879ce

View File

@ -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);
}