(svn r14905) -Fix (r14899): in some corner cases already freed memory could be read.

This commit is contained in:
rubidium
2009-01-07 18:59:46 +00:00
parent 6bd14cf1a1
commit c71862174a
3 changed files with 51 additions and 22 deletions

View File

@@ -219,8 +219,7 @@ static Point _vp_move_offs;
static void DoSetViewportPosition(const Window *w, int left, int top, int width, int height)
{
for (; w != NULL; w = w->z_front) {
FOR_ALL_WINDOWS_FROM_BACK_FROM(w, w) {
if (left + width > w->left &&
w->left + w->width > left &&
top + height > w->top &&