Skip to content

Commit

Permalink
use null_pen stock object for ps_null pen
Browse files Browse the repository at this point in the history
  • Loading branch information
cracyc committed Apr 18, 2021
1 parent 278e47d commit dc01e41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gdi/gdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,9 @@ HPEN16 WINAPI CreatePen16( INT16 style, INT16 width, COLORREF color )
{
LOGPEN logpen;

if (style == PS_NULL)
return GetStockObject16(NULL_PEN);

logpen.lopnStyle = style;
logpen.lopnWidth.x = width;
logpen.lopnWidth.y = 0;
Expand All @@ -1903,6 +1906,9 @@ HPEN16 WINAPI CreatePenIndirect16( const LOGPEN16 * pen )
{
LOGPEN logpen;

if (pen->lopnStyle == PS_NULL)
return GetStockObject16(NULL_PEN);

if (pen->lopnStyle > PS_INSIDEFRAME) return 0;
logpen.lopnStyle = pen->lopnStyle;
logpen.lopnWidth.x = pen->lopnWidth.x;
Expand Down

0 comments on commit dc01e41

Please sign in to comment.