Changeset 5595 for trunk/src


Ignore:
Timestamp:
Apr 26, 2001, 7:01:08 PM (24 years ago)
Author:
sandervl
Message:

InternalTextOutW fix (breakpoint hit in debug build)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/text.cpp

    r5511 r5595  
    1 /* $Id: text.cpp,v 1.17 2001-04-15 17:04:47 sandervl Exp $ */
     1/* $Id: text.cpp,v 1.18 2001-04-26 17:01:08 sandervl Exp $ */
    22
    33/*
     
    777777BOOL InternalTextOutW(HDC hdc,int X,int Y,UINT fuOptions,CONST RECT *lprc,LPCWSTR lpszString,INT cbCount,CONST INT *lpDx,BOOL IsExtTextOut)
    778778{
    779   char *astring;
     779  char *astring = NULL;
    780780  BOOL  rc;
    781781
     
    783783     astring = UnicodeToAsciiString((LPWSTR)lpszString);
    784784  }
    785   else {
     785  else
     786  if(cbCount) {
    786787     astring = (char *)HEAP_malloc(cbCount+1);
    787788     UnicodeToAscii((LPWSTR)lpszString, astring);
     
    789790  }
    790791  rc = InternalTextOutA(hdc,X,Y,fuOptions,lprc,(LPCSTR)astring,cbCount,lpDx,IsExtTextOut);
    791   FreeAsciiString(astring);
     792  if(astring) {
     793      FreeAsciiString(astring);
     794  }
    792795
    793796  return(rc);
Note: See TracChangeset for help on using the changeset viewer.