Commit 9ab7d9e2 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Close the original record before copying new data into it.

parent a44b653d
...@@ -698,6 +698,7 @@ extern UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine, ...@@ -698,6 +698,7 @@ extern UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
BOOL preserve_case ); BOOL preserve_case );
/* record internals */ /* record internals */
extern void MSI_CloseRecord( MSIOBJECTHDR * );
extern UINT MSI_RecordSetIStream( MSIRECORD *, UINT, IStream *); extern UINT MSI_RecordSetIStream( MSIRECORD *, UINT, IStream *);
extern UINT MSI_RecordGetIStream( MSIRECORD *, UINT, IStream **); extern UINT MSI_RecordGetIStream( MSIRECORD *, UINT, IStream **);
extern const WCHAR *MSI_RecordGetString( const MSIRECORD *, UINT ); extern const WCHAR *MSI_RecordGetString( const MSIRECORD *, UINT );
......
...@@ -64,7 +64,7 @@ static void MSI_FreeField( MSIFIELD *field ) ...@@ -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; MSIRECORD *rec = (MSIRECORD *) arg;
UINT i; UINT i;
......
...@@ -1835,6 +1835,9 @@ static UINT msi_refresh_record( struct tagMSIVIEW *view, MSIRECORD *rec, UINT ro ...@@ -1835,6 +1835,9 @@ static UINT msi_refresh_record( struct tagMSIVIEW *view, MSIRECORD *rec, UINT ro
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
return r; return r;
/* Close the original record */
MSI_CloseRecord(&rec->hdr);
count = MSI_RecordGetFieldCount(rec); count = MSI_RecordGetFieldCount(rec);
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
MSI_RecordCopyField(curr, i + 1, rec, i + 1); MSI_RecordCopyField(curr, i + 1, rec, i + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment