quotatypes: fix NPE issue

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2015-10-30 12:23:49 +05:30
parent b63778c4b2
commit 8f816e70f0
1 changed files with 5 additions and 1 deletions

View File

@ -94,6 +94,10 @@ public class QuotaTypes extends UsageTypes {
}
static public String getDescription(int quotaType) {
return quotaTypeMap.get(quotaType).getDescription();
QuotaTypes t = quotaTypeMap.get(quotaType);
if (t != null) {
return t.getDescription();
}
return null;
}
}