From 2b66a37a3e9b6528d5e398a2c1dad4611a38e1b4 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 12 Feb 2014 16:38:51 +0100 Subject: [PATCH] Fix crash in MinGW when initializing font database Make sure that stacks are properly aligned so that we don't crash in SSE2 code (as used in QString). Task-number: QTBUG-36807 Change-Id: I765c1972fbb0a4b0c2dc5e4465e1d19e00b3322b Reviewed-by: Thiago Macieira Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 2fa08d30ce..fafdb37717 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -933,8 +933,8 @@ static bool addFontToDatabase(const QString &familyName, uchar charSet, return true; } -static int CALLBACK storeFont(ENUMLOGFONTEX* f, NEWTEXTMETRICEX *textmetric, - int type, LPARAM namesSetIn) +static int QT_ENSURE_STACK_ALIGNED_FOR_SSE CALLBACK +storeFont(ENUMLOGFONTEX* f, NEWTEXTMETRICEX *textmetric, int type, LPARAM namesSetIn) { typedef QSet StringSet; const QString familyName = QString::fromWCharArray(f->elfLogFont.lfFaceName);