msi: Close the original record before copying new data into it.
This commit is contained in:
parent
a44b653d53
commit
9ab7d9e21a
|
@ -698,6 +698,7 @@ extern UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
|
|||
BOOL preserve_case );
|
||||
|
||||
/* record internals */
|
||||
extern void MSI_CloseRecord( MSIOBJECTHDR * );
|
||||
extern UINT MSI_RecordSetIStream( MSIRECORD *, UINT, IStream *);
|
||||
extern UINT MSI_RecordGetIStream( MSIRECORD *, UINT, IStream **);
|
||||
extern const WCHAR *MSI_RecordGetString( const MSIRECORD *, UINT );
|
||||
|
|
|
@ -64,7 +64,7 @@ static void MSI_FreeField( MSIFIELD *field )
|
|||
}
|
||||
}
|
||||
|
||||
static void MSI_CloseRecord( MSIOBJECTHDR *arg )
|
||||
void MSI_CloseRecord( MSIOBJECTHDR *arg )
|
||||
{
|
||||
MSIRECORD *rec = (MSIRECORD *) arg;
|
||||
UINT i;
|
||||
|
|
|
@ -1835,6 +1835,9 @@ static UINT msi_refresh_record( struct tagMSIVIEW *view, MSIRECORD *rec, UINT ro
|
|||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
/* Close the original record */
|
||||
MSI_CloseRecord(&rec->hdr);
|
||||
|
||||
count = MSI_RecordGetFieldCount(rec);
|
||||
for (i = 0; i < count; i++)
|
||||
MSI_RecordCopyField(curr, i + 1, rec, i + 1);
|
||||
|
|
Loading…
Reference in New Issue