FINERACT-2034 : Fixed Handle Null Loan Cycle Counter in Loan Product Assignment for Borrow Cycle Enabled Products
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java
index 20572c6..acff5c5 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java
@@ -500,7 +500,7 @@
         BigDecimal interestRatePerPeriod = null;
 
         Integer numberOfRepayments = null;
-        if (product.isUseBorrowerCycle() && loanCycleNumber > 0) {
+        if (product.isUseBorrowerCycle() && loanCycleNumber != null && loanCycleNumber > 0) {
             Collection<LoanProductBorrowerCycleVariationData> principalVariationsForBorrowerCycle = product
                     .getPrincipalVariationsForBorrowerCycle();
             Collection<LoanProductBorrowerCycleVariationData> interestForVariationsForBorrowerCycle = product