mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 19:38:09 +00:00
Fix crashes when starting the application if no linphonerc file exists yet.
This commit is contained in:
parent
dd84961b73
commit
39cc76d46b
2 changed files with 5 additions and 5 deletions
|
|
@ -71,7 +71,7 @@ void Colors::overrideColors (const shared_ptr<linphone::Config> &config) {
|
|||
for (int i = info->propertyOffset(); i < info->propertyCount(); ++i) {
|
||||
const QMetaProperty metaProperty = info->property(i);
|
||||
const string colorName = metaProperty.name();
|
||||
const string colorValue = config->getString(COLORS_SECTION, colorName, "");
|
||||
const string colorValue = config ? config->getString(COLORS_SECTION, colorName, "") : "";
|
||||
|
||||
if (!colorValue.empty())
|
||||
setProperty(colorName.c_str(), QColor(::Utils::coreStringToAppString(colorValue)));
|
||||
|
|
|
|||
|
|
@ -773,11 +773,11 @@ void SettingsModel::setLogsEmail (const QString &email) {
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
QString SettingsModel::getLogsFolder (const shared_ptr<linphone::Config> &config) {
|
||||
return ::Utils::coreStringToAppString(
|
||||
config->getString(UI_SECTION, "logs_folder", Paths::getLogsDirPath())
|
||||
);
|
||||
return ::Utils::coreStringToAppString(config
|
||||
? config->getString(UI_SECTION, "logs_folder", Paths::getLogsDirPath())
|
||||
: Paths::getLogsDirPath());
|
||||
}
|
||||
|
||||
bool SettingsModel::getLogsEnabled (const shared_ptr<linphone::Config> &config) {
|
||||
return config->getInt(UI_SECTION, "logs_enabled", false);
|
||||
return config ? config->getInt(UI_SECTION, "logs_enabled", false) : false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue