From 5f375dfa609f0e5632e4fc32be13aee07c531cf0 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 13 May 2014 10:10:08 +0000 Subject: [PATCH] IconDes: Fixed debug crash problem git-svn-id: svn://ultimatepp.org/upp/trunk@7368 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlCore/init | 2 +- uppsrc/IconDes/IconDraw.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/uppsrc/CtrlCore/init b/uppsrc/CtrlCore/init index 27c33a181..aa63470cf 100644 --- a/uppsrc/CtrlCore/init +++ b/uppsrc/CtrlCore/init @@ -3,7 +3,7 @@ #include "Draw/init" #include "plugin\bmp/init" #include "RichText/init" -#define BLITZ_INDEX__ Fe2ff541f9bb9f4ad3f5bcc23a34e1b73 +#define BLITZ_INDEX__ F656a4ea94e4f808b1ec63034b0e6c5ac #include "CtrlCore.icpp" #undef BLITZ_INDEX__ #endif diff --git a/uppsrc/IconDes/IconDraw.cpp b/uppsrc/IconDes/IconDraw.cpp index 7228161a6..22d4337da 100644 --- a/uppsrc/IconDes/IconDraw.cpp +++ b/uppsrc/IconDes/IconDraw.cpp @@ -21,6 +21,8 @@ void IconDraw::PutVert(int x, int y, int cy) int b = minmax(y + cy, 0, image.GetHeight()); y = minmax(y, 0, image.GetHeight()); cy = b - y; + if(cy <= 0) + return; RGBA *t = image[y] + x; while(cy-- > 0) { *t = docolor;