From 6217b3fca759b49dede767c6c99a312d3482e720 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 29 Apr 2008 01:57:32 +0000 Subject: Fixed a bogus assert and a rare but obvious crash bug. Reviewed by Palmer --- indra/llrender/llimagegl.cpp | 2 +- indra/newview/llviewerwindow.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index d5ad38dff3..a7bfe64f92 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -628,7 +628,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) { S32 bytes = w * h * mComponents; llassert(prev_mip_data); - llassert(prev_mip_size == bytes); + llassert(prev_mip_size == bytes*4); U8* new_data = new U8[bytes]; llassert_always(new_data); LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a753032180..2c283faf3b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1259,8 +1259,8 @@ void LLViewerWindow::handleFocusLost(LLWindow *window) } // restore mouse cursor - gViewerWindow->showCursor(); - gViewerWindow->getWindow()->setMouseClipping(FALSE); + showCursor(); + getWindow()->setMouseClipping(FALSE); // JC - Leave keyboard focus, so if you're popping in and out editing // a script, you don't have to click in the editor again and again. @@ -1435,7 +1435,7 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S void LLViewerWindow::handleScrollWheel(LLWindow *window, S32 clicks) { - gViewerWindow->handleScrollWheel( clicks ); + handleScrollWheel( clicks ); } void LLViewerWindow::handleWindowBlock(LLWindow *window) -- cgit v1.2.3