X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f7fce73bf99d65bbd04df1468207bf893b9a938..a7734bdfb398c42321d985abdad7304bb3ac5182:/src/aui/dockart.cpp diff --git a/src/aui/dockart.cpp b/src/aui/dockart.cpp index 9fbcddae2e..116fb79804 100644 --- a/src/aui/dockart.cpp +++ b/src/aui/dockart.cpp @@ -153,9 +153,9 @@ static void DrawGradientRectangle(wxDC& dc, int r,g,b; - r = start_color.Red() + ((i*rd*100)/high)/100; - g = start_color.Green() + ((i*gd*100)/high)/100; - b = start_color.Blue() + ((i*bd*100)/high)/100; + r = start_color.Red() + (high <= 0 ? 0 : (((i*rd*100)/high)/100)); + g = start_color.Green() + (high <= 0 ? 0 : (((i*gd*100)/high)/100)); + b = start_color.Blue() + (high <= 0 ? 0 : (((i*bd*100)/high)/100)); wxPen p(wxColor((unsigned char)r, (unsigned char)g,