Capth potention LC is null exception

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2012-04-27 11:05:00 +02:00
parent b965cbaa65
commit e5a08e7a8e
2 changed files with 10 additions and 2 deletions

View file

@ -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;
}

View file

@ -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]]);
}