src/java.desktop/windows/native/libawt/java2d/windows/GDIRenderer.cpp
changeset 50484 f8c15a2f2ae9
parent 47216 71c04702a3d5
equal deleted inserted replaced
50483:10b8e57899b3 50484:f8c15a2f2ae9
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    83     if ((close && !isclosed) || fixend) {
    83     if ((close && !isclosed) || fixend) {
    84         outpoints++;
    84         outpoints++;
    85         *pNpoints = outpoints;
    85         *pNpoints = outpoints;
    86     }
    86     }
    87     if (outpoints > POLYTEMPSIZE) {
    87     if (outpoints > POLYTEMPSIZE) {
    88         pPoints = (POINT *) SAFE_SIZE_ARRAY_ALLOC(safe_Malloc, sizeof(POINT), outpoints);
    88         try {
       
    89             pPoints = (POINT *) SAFE_SIZE_ARRAY_ALLOC(safe_Malloc, sizeof(POINT), outpoints);
       
    90         } catch (const std::bad_alloc&) {
       
    91             return NULL;
       
    92         }
    89     }
    93     }
    90     BOOL isempty = fixend;
    94     BOOL isempty = fixend;
    91     for (int i = 0; i < npoints; i++) {
    95     for (int i = 0; i < npoints; i++) {
    92         x = xpoints[i];
    96         x = xpoints[i];
    93         y = ypoints[i];
    97         y = ypoints[i];