LCL-Gtk2: Call SetExceptionMask for all CPUs, not only for x86 (thus unify it with other widgetsets). Fixes crashes on AArch64, issue #41188.

This commit is contained in:
Maxim Ganetsky 2024-11-06 15:35:08 +03:00
parent 6feb18f05a
commit 7cfcb81528

View File

@ -1143,12 +1143,10 @@ function gdk_screen_get_resolution(screen:PGdkScreen):gdouble; cdecl; external g
------------------------------------------------------------------------------}
procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);
begin
{$if defined(cpui386) or defined(cpux86_64)}
// needed otherwise some gtk theme engines crash with division by zero
{$IFNDEF DisableGtkDivZeroFix}
SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]);
{$ENDIF}
{$ifend}
InitKeyboardTables;
{ Compute pixels per inch variable }