[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog nsterm.m [EMACS_23_1_RC]
From: |
Adrian Robert |
Subject: |
[Emacs-diffs] emacs/src ChangeLog nsterm.m [EMACS_23_1_RC] |
Date: |
Thu, 23 Jul 2009 13:21:11 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_23_1_RC
Changes by: Adrian Robert <arobert> 09/07/23 13:21:10
Modified files:
src : ChangeLog nsterm.m
Log message:
* nsterm.m (ns_lookup_indexed_color): Check for bad index.
(ns_index_color): Init unused slot to 0. (ns_dumpglyphs_box_or_relief):
Replace useless xassert with an if(). Bug 3714, possibly 3082.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.7586.2.30&r2=1.7586.2.31
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsterm.m?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.75.2.5&r2=1.75.2.6
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7586.2.30
retrieving revision 1.7586.2.31
diff -u -b -r1.7586.2.30 -r1.7586.2.31
--- ChangeLog 23 Jul 2009 11:50:29 -0000 1.7586.2.30
+++ ChangeLog 23 Jul 2009 13:21:07 -0000 1.7586.2.31
@@ -1,6 +1,11 @@
2009-07-23 Adrian Robert <address@hidden>
* nsterm.m (EmacsView-keyUp:): Only act when running under Tiger.
+ Bugs 3792, 3720, 2402.
+ (ns_lookup_indexed_color): Check for bad index.
+ (ns_index_color): Init unused slot to 0.
+ (ns_dumpglyphs_box_or_relief): Replace useless xassert with an if().
+ Bug 3714, possibly 3082.
2009-07-21 Chong Yidong <address@hidden>
Index: nsterm.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsterm.m,v
retrieving revision 1.75.2.5
retrieving revision 1.75.2.6
diff -u -b -r1.75.2.5 -r1.75.2.6
--- nsterm.m 23 Jul 2009 11:50:32 -0000 1.75.2.5
+++ nsterm.m 23 Jul 2009 13:21:10 -0000 1.75.2.6
@@ -1249,6 +1249,8 @@
ns_lookup_indexed_color (unsigned long idx, struct frame *f)
{
struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
+ if (idx < 1 || idx >= color_table->avail)
+ return nil;
return color_table->colors[idx];
}
@@ -1266,6 +1268,7 @@
color_table->avail = 1; /* skip idx=0 as marker */
color_table->colors
= (NSColor **)xmalloc (color_table->size * sizeof (NSColor *));
+ color_table->colors[0] = nil;
color_table->empty_indices = [[NSMutableSet alloc] init];
}
@@ -2650,9 +2653,9 @@
r = ns_fix_rect_ibw (r, FRAME_INTERNAL_BORDER_WIDTH (s->f),
FRAME_PIXEL_WIDTH (s->f));
- if (s->face->box == FACE_SIMPLE_BOX)
+ /* TODO: Sometimes box_color is 0 and this seems wrong; should investigate.
*/
+ if (s->face->box == FACE_SIMPLE_BOX && s->face->box_color)
{
- xassert (s->face->box_color != nil);
ns_draw_box (r, abs (thickness),
ns_lookup_indexed_color (face->box_color, s->f),
left_p, right_p);