зеркало из https://github.com/mozilla/gecko-dev.git
Bug 529734 - Firefox 3.6b3 Crash [@ CMValidateProfile ]; mingw fix v1.1.
r=neil.
This commit is contained in:
Родитель
b925d13af6
Коммит
aef70d0dfa
|
@ -301,20 +301,27 @@ qcms_profile*
|
|||
gfxWindowsPlatform::GetPlatformCMSOutputProfile()
|
||||
{
|
||||
#ifndef MOZ_FT2_FONTS
|
||||
WCHAR str[1024+1];
|
||||
DWORD size = 1024;
|
||||
WCHAR str[MAX_PATH];
|
||||
DWORD size = MAX_PATH;
|
||||
BOOL res;
|
||||
|
||||
HDC dc = GetDC(nsnull);
|
||||
if (!dc)
|
||||
return nsnull;
|
||||
|
||||
#if _MSC_VER
|
||||
__try {
|
||||
GetICMProfileW(dc, &size, (LPWSTR)&str);
|
||||
res = GetICMProfileW(dc, &size, (LPWSTR)&str);
|
||||
} __except(GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) {
|
||||
str[0] = 0;
|
||||
res = FALSE;
|
||||
}
|
||||
#else
|
||||
res = GetICMProfileW(dc, &size, (LPWSTR)&str);
|
||||
#endif
|
||||
|
||||
ReleaseDC(nsnull, dc);
|
||||
if (!res)
|
||||
return nsnull;
|
||||
|
||||
qcms_profile* profile =
|
||||
qcms_profile_from_path(NS_ConvertUTF16toUTF8(str).get());
|
||||
|
|
Загрузка…
Ссылка в новой задаче