diff options
| author | Richard M. Stallman | 2005-04-09 23:51:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-04-09 23:51:18 +0000 |
| commit | 6183d8422dc7e32df05454c13b6fa6c97cf5cbbb (patch) | |
| tree | 3e6008b8065a1bb8581a464c8d42a37398a858e5 /src | |
| parent | 941f97789e0a5e28bf4e27e187dfca67352e11b2 (diff) | |
| download | emacs-6183d8422dc7e32df05454c13b6fa6c97cf5cbbb.tar.gz emacs-6183d8422dc7e32df05454c13b6fa6c97cf5cbbb.zip | |
(mirror_line_dance): Avoid crash if W2 is null.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 5ffd1a2ce58..4f29abdb389 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -3165,14 +3165,20 @@ mirror_line_dance (w, unchanged_at_top, nlines, copy_from, retained_p) | |||
| 3165 | int m2_from; | 3165 | int m2_from; |
| 3166 | 3166 | ||
| 3167 | w2 = frame_row_to_window (root, frame_from); | 3167 | w2 = frame_row_to_window (root, frame_from); |
| 3168 | m2 = w2->current_matrix; | 3168 | /* ttn@surf.glug.org: when enabling menu bar using `emacs |
| 3169 | m2_from = frame_from - m2->matrix_y; | 3169 | -nw', FROM_FRAME sometimes has no associated window. |
| 3170 | copy_row_except_pointers (m->rows + window_to, | 3170 | This check avoids a segfault if W2 is null. */ |
| 3171 | m2->rows + m2_from); | 3171 | if (w2) |
| 3172 | 3172 | { | |
| 3173 | /* If frame line is empty, window line is empty, too. */ | 3173 | m2 = w2->current_matrix; |
| 3174 | if (!retained_p[copy_from[i]]) | 3174 | m2_from = frame_from - m2->matrix_y; |
| 3175 | m->rows[window_to].enabled_p = 0; | 3175 | copy_row_except_pointers (m->rows + window_to, |
| 3176 | m2->rows + m2_from); | ||
| 3177 | |||
| 3178 | /* If frame line is empty, window line is empty, too. */ | ||
| 3179 | if (!retained_p[copy_from[i]]) | ||
| 3180 | m->rows[window_to].enabled_p = 0; | ||
| 3181 | } | ||
| 3176 | sync_p = 1; | 3182 | sync_p = 1; |
| 3177 | } | 3183 | } |
| 3178 | else if (from_inside_window_p) | 3184 | else if (from_inside_window_p) |