mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
Capth potention LC is null exception
This commit is contained in:
parent
b965cbaa65
commit
e5a08e7a8e
2 changed files with 10 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue