[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9627b73: Fix crash in xwidget_end_redisplay
From: |
Po Lu |
Subject: |
master 9627b73: Fix crash in xwidget_end_redisplay |
Date: |
Sat, 13 Nov 2021 21:00:53 -0500 (EST) |
branch: master
commit 9627b731c0611fd14850edd2e045f2c606fc151e
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix crash in xwidget_end_redisplay
* src/xwidget.c (xwidget_end_redisplay): Always test if xv is
NULL.
---
src/xwidget.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/xwidget.c b/src/xwidget.c
index ca0392a..609a231 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -2643,19 +2643,16 @@ xwidget_end_redisplay (struct window *w, struct
glyph_matrix *matrix)
xwidget_end_redisplay (w->current_matrix); */
struct xwidget_view *xv
= xwidget_view_lookup (xwidget_from_id (glyph->u.xwidget),
w);
-#ifdef USE_GTK
- /* FIXME: Is it safe to assume xwidget_view_lookup
- always succeeds here? If so, this comment can be removed.
- If not, the code probably needs fixing. */
- eassume (xv);
- xwidget_touch (xv);
-#elif defined NS_IMPL_COCOA
- /* In NS xwidget, xv can be NULL for the second or
+
+ /* In NS xwidget, xv can be NULL for the second or
later views for a model, the result of 1 to 1
- model view relation enforcement. */
+ model view relation enforcement. `xwidget_view_lookup'
+ has also been observed to return NULL here on X-Windows
+ at least once, so stay safe and only touch it if it's
+ not NULL. */
+
if (xv)
xwidget_touch (xv);
-#endif
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 9627b73: Fix crash in xwidget_end_redisplay,
Po Lu <=