Commit d328af75 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

winex11.drv: Don't compare error event serial if it's zero.

Sometimes error event serial is zero. For example, NVIDIA driver may send X_GLXCopyContext errors with the event serial set to zero. When it's zero, previously the error handler passes the error to the default error handler and cause application crashes. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com>
parent 18ae96e5
...@@ -304,7 +304,7 @@ int X11DRV_check_error(void) ...@@ -304,7 +304,7 @@ int X11DRV_check_error(void)
static int error_handler( Display *display, XErrorEvent *error_evt ) static int error_handler( Display *display, XErrorEvent *error_evt )
{ {
if (err_callback && display == err_callback_display && if (err_callback && display == err_callback_display &&
(long)(error_evt->serial - err_serial) >= 0) (!error_evt->serial || error_evt->serial >= err_serial))
{ {
if ((err_callback_result = err_callback( display, error_evt, err_callback_arg ))) if ((err_callback_result = err_callback( display, error_evt, err_callback_arg )))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment