msi: Fix some NULL dereferences (Coverity).

This commit is contained in:
Marcus Meissner 2011-06-11 11:33:08 +02:00 committed by Alexandre Julliard
parent 891fcb20ac
commit aec497b03d
1 changed files with 4 additions and 4 deletions

View File

@ -216,13 +216,13 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
file = msi_get_loaded_file( package, filename ); file = msi_get_loaded_file( package, filename );
if (!file) if (!file)
{ {
WARN("unable to find file %s\n", debugstr_w(file->File)); WARN("unable to find file %s\n", debugstr_w(filename));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
comp = msi_get_loaded_component( package, file->Component->Component ); comp = msi_get_loaded_component( package, file->Component->Component );
if (!comp) if (!comp)
{ {
WARN("unable to find component %s\n", debugstr_w(comp->Component)); WARN("unable to find component %s\n", debugstr_w(file->Component->Component));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
comp->Action = msi_get_component_action( package, comp ); comp->Action = msi_get_component_action( package, comp );
@ -301,13 +301,13 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param )
file = msi_get_loaded_file( package, filename ); file = msi_get_loaded_file( package, filename );
if (!file) if (!file)
{ {
WARN("unable to find file %s\n", debugstr_w(file->File)); WARN("unable to find file %s\n", debugstr_w(filename));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
comp = msi_get_loaded_component( package, file->Component->Component ); comp = msi_get_loaded_component( package, file->Component->Component );
if (!comp) if (!comp)
{ {
WARN("unable to find component %s\n", debugstr_w(comp->Component)); WARN("unable to find component %s\n", debugstr_w(file->Component->Component));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
comp->Action = msi_get_component_action( package, comp ); comp->Action = msi_get_component_action( package, comp );