From c07901e29ed545bbb02e3bddf148fe1104b94e9f Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:56 -0500 Subject: Second Life viewer sources 1.15.1.3 --- linden/indra/llui/llui.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'linden/indra/llui/llui.cpp') diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index 9d689b5..a725281 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp @@ -421,6 +421,12 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border stop_glerror(); F32 border_scale = 1.f; + if (NULL == image) + { + llwarns << "image == NULL; aborting function" << llendl; + return; + } + if (border_height * 2 > height) { border_scale = (F32)height / ((F32)border_height * 2.f); @@ -599,6 +605,12 @@ void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LL void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color) { + if (NULL == image) + { + llwarns << "image == NULL; aborting function" << llendl; + return; + } + LLGLSUIDefault gls_ui; glPushMatrix(); @@ -639,6 +651,12 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color) { + if (NULL == image) + { + llwarns << "image == NULL; aborting function" << llendl; + return; + } + LLGLSUIDefault gls_ui; glPushMatrix(); -- cgit v1.1