Skip to content

Commit

Permalink
fix resource leak
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Oct 3, 2024
1 parent 8a5f17d commit b5bad89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions win32/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -2028,12 +2028,14 @@ apc_font_begin_query( Handle self )
{
if ( !( sys ps = CreateCompatibleDC( NULL )))
return false;
sys stock_font = GetCurrentObject( sys ps, OBJ_FONT);
return true;
}

void
apc_font_end_query( Handle self )
{
SelectObject( sys ps, sys stock_font);
DeleteDC( sys ps );
sys ps = 0;
}
Expand Down

0 comments on commit b5bad89

Please sign in to comment.