diff --git a/Classes/MainScreenWithVideoPreview.m b/Classes/MainScreenWithVideoPreview.m index 118c6af0a..c35983820 100644 --- a/Classes/MainScreenWithVideoPreview.m +++ b/Classes/MainScreenWithVideoPreview.m @@ -128,10 +128,18 @@ -(void) showPreview:(BOOL) show { + LinphoneCore* lc; + @try { + lc = [LinphoneManager getLc]; + } + @catch (NSException *exception) { + return; + } + bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"]; if (enableVideo) { - LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); + LinphoneCall* call = linphone_core_get_current_call(lc); if (show && call && linphone_call_params_video_enabled(linphone_call_get_current_params(call))) { return; } diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index 9d1f45a12..518f3bcd9 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -113,7 +113,7 @@ [callShort setEnabled:!linphone_core_sound_resources_locked([LinphoneManager getLc])]; } @catch (NSException* exc) { // R.A.S: linphone core si simply not ready... - ms_warning("Exception %s: %s", + ms_warning("Catched exception %s: %s", [exc.name cStringUsingEncoding:[NSString defaultCStringEncoding]], [exc.reason cStringUsingEncoding:[NSString defaultCStringEncoding]]); }