From d064dfc21a1fbd7ff3eedcc13f64f2e4b843bdfe Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 14 May 2014 08:27:02 +0800 Subject: [PATCH] Fix the block bug. --- MessageDisplayKit/Classes/Common/XHVoiceRecordHelper.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MessageDisplayKit/Classes/Common/XHVoiceRecordHelper.m b/MessageDisplayKit/Classes/Common/XHVoiceRecordHelper.m index 6246514..72a30b3 100644 --- a/MessageDisplayKit/Classes/Common/XHVoiceRecordHelper.m +++ b/MessageDisplayKit/Classes/Common/XHVoiceRecordHelper.m @@ -221,7 +221,9 @@ - (void)_updateMeters { if (!_isPause) { float progress = self.currentTimeInterval / self.maxRecordTime * 1.0; dispatch_async(dispatch_get_main_queue(), ^{ - _recordProgress(progress); + if (_recordProgress) { + _recordProgress(progress); + } }); }