fix nil pointer

This commit is contained in:
yifhao 2018-10-17 12:57:00 +08:00
parent c67b32a22a
commit da2991ab30
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ func (session *Session) Delete(bean interface{}) (int64, error) {
return 0, err
}
pLimitN := session.statement.LimitN
if len(condSQL) == 0 && pLimitN == nil && *pLimitN == 0 {
if len(condSQL) == 0 && (pLimitN == nil || *pLimitN == 0) {
return 0, ErrNeedDeletedCond
}