Commit fb3f40b9 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix crash that occurred when an invalid query string was deleted

twice.
parent f558741f
...@@ -767,6 +767,7 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview ) ...@@ -767,6 +767,7 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview )
{ {
if( *sql.view ) if( *sql.view )
(*sql.view)->ops->delete( *sql.view ); (*sql.view)->ops->delete( *sql.view );
*sql.view = NULL;
return ERROR_BAD_QUERY_SYNTAX; return ERROR_BAD_QUERY_SYNTAX;
} }
......
...@@ -295,7 +295,8 @@ static UINT WHERE_delete( struct tagMSIVIEW *view ) ...@@ -295,7 +295,8 @@ static UINT WHERE_delete( struct tagMSIVIEW *view )
wv->reorder = NULL; wv->reorder = NULL;
wv->row_count = 0; wv->row_count = 0;
delete_expr( wv->cond ); if( wv->cond )
delete_expr( wv->cond );
HeapFree( GetProcessHeap(), 0, wv ); HeapFree( GetProcessHeap(), 0, wv );
...@@ -340,6 +341,7 @@ UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table ) ...@@ -340,6 +341,7 @@ UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table )
wv->table = table; wv->table = table;
wv->row_count = 0; wv->row_count = 0;
wv->reorder = NULL; wv->reorder = NULL;
wv->cond = NULL;
*view = (MSIVIEW*) wv; *view = (MSIVIEW*) wv;
return ERROR_SUCCESS; return ERROR_SUCCESS;
......
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