APPROVE COMMIT RECOMMEND 21.4
Way back in October Zajcev Evgeny reported the following:
If XEmacs is compiled with memory usage enabled, running in console and
issuing `(window-memory-usage (selected-window))' will core dump XEmacs
because tty console does not have method to compute scrollbar instance
usage and there no check for that.
His suggested solution, cast as a patch below, fixes the problem.
This patch has been committed. It is applicable for 21.4 as well.
Thanks Zajcev!
Malcolm
src/ChangeLog addition:
2005-01-06 Zajcev Evgeny <zevlg(a)yandex.ru>
* scrollbar.c (compute_scrollbar_instance_usage):
Only call device method compute_scrollbar_instance_usage() if it
is defined.
xemacs-memory-usage source patch:
Diff command: cvs -q diff -u
Files affected: src/scrollbar.c
Index: src/scrollbar.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/scrollbar.c,v
retrieving revision 1.32
diff -u -r1.32 scrollbar.c
--- src/scrollbar.c 2004/09/20 19:19:59 1.32
+++ src/scrollbar.c 2005/01/06 03:14:23
@@ -267,7 +267,8 @@
{
int total = 0;
- total += DEVMETH (d, compute_scrollbar_instance_usage, (d, inst, ovstats));
+ if (HAS_DEVMETH_P(d, compute_scrollbar_instance_usage))
+ total += DEVMETH (d, compute_scrollbar_instance_usage, (d, inst, ovstats));
while (inst)
{
--
Malcolm Purvis <malcolmpurvis(a)optushome.com.au>
Q: Why did the chicken cross the Mobius strip?
A: To get to the other... uh... err...