Skip to content

Commit 080fbbd

Browse files
author
wenlong
committed
修改开机时间不对时的空指针错误
1 parent df66a45 commit 080fbbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/obd/service/DataSyncService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private BDLocation getBDLocation(BDLocation loc){
279279
return getLastPos(loc);
280280
}else{
281281
time = mGetLoaction.formatTime(time);
282-
if(lastLocTime!=null)
282+
if(lastLocTime!=null && time != null)
283283
MyLog.D("compareTo="+time.compareTo(lastLocTime));
284284
if(lastLocTime==null || (time!=null && time.compareTo(lastLocTime)>0)){
285285
loc.setTime(time);

0 commit comments

Comments
 (0)