summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/addcontact.cpp8
-rw-r--r--src/mir_app/src/services.cpp1
2 files changed, 4 insertions, 5 deletions
diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp
index 7b049000c0..5a3ef8408a 100644
--- a/src/mir_app/src/addcontact.cpp
+++ b/src/mir_app/src/addcontact.cpp
@@ -96,14 +96,12 @@ public:
isSet = 1;
}
}
- if (!isSet)
- {
+ if (!isSet) {
if (m_acs.handleType == HANDLE_EVENT)
szName = mir_a2u(szUin);
- else
- {
+ else {
szName = sttDecodeString(m_acs.psr->flags, m_acs.psr->id);
- if (!szName)
+ if (szName == NULL)
szName = sttDecodeString(m_acs.psr->flags, m_acs.psr->nick);
}
}
diff --git a/src/mir_app/src/services.cpp b/src/mir_app/src/services.cpp
index 65b27c4862..04f30a5aba 100644
--- a/src/mir_app/src/services.cpp
+++ b/src/mir_app/src/services.cpp
@@ -225,6 +225,7 @@ void UpdateFontSettings(FontIDW *font_id, FontSettingsW *fontsettings)
CreateFromFontSettings(&font_id->deffontsettings, &lf);
colour = font_id->deffontsettings.colour;
}
+ else memset(&lf, 0, sizeof(lf));
fontsettings->style =
(lf.lfWeight == FW_NORMAL ? 0 : DBFONTF_BOLD) | (lf.lfItalic ? DBFONTF_ITALIC : 0) | (lf.lfUnderline ? DBFONTF_UNDERLINE : 0) | (lf.lfStrikeOut ? DBFONTF_STRIKEOUT : 0);