aboutsummaryrefslogtreecommitdiff
path: root/src/client/ios
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ios')
-rw-r--r--src/client/ios/BreakpadController.mm9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/ios/BreakpadController.mm b/src/client/ios/BreakpadController.mm
index bf31647d..ffba9e69 100644
--- a/src/client/ios/BreakpadController.mm
+++ b/src/client/ios/BreakpadController.mm
@@ -129,6 +129,9 @@ NSString* GetPlatform() {
#pragma mark -
- (void)start:(BOOL)onCurrentThread {
+ if (started)
+ return;
+ started_ = YES;
void(^startBlock)() = ^{
assert(!breakpadRef_);
breakpadRef_ = BreakpadCreate(configuration_);
@@ -136,8 +139,6 @@ NSString* GetPlatform() {
BreakpadAddUploadParameter(breakpadRef_, @"platform", GetPlatform());
}
};
- NSAssert(!started_, @"Start cannot be called more than once.");
- started_ = YES;
if (onCurrentThread)
startBlock();
else
@@ -145,8 +146,8 @@ NSString* GetPlatform() {
}
- (void)stop {
- NSAssert(started_,
- @"The controller must be started before it can be stopped");
+ if (!started)
+ return;
started_ = NO;
dispatch_sync(queue_, ^{
if (breakpadRef_) {