From dacea64643b2be66eded9a8cfbcd9bbc2b34699b Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 2 Sep 2005 11:21:22 +0000 Subject: [PATCH] Add objects to lists at the right time. --- dlls/msi/classes.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index b2b640bca1a..b94e1f6d16b 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -240,6 +240,8 @@ static MSICLASS *load_class( MSIPACKAGE* package, MSIRECORD *row ) if (!cls) return NULL; + list_add_tail( &package->classes, &cls->entry ); + sz = IDENTIFIER_SIZE; MSI_RecordGetStringW(row, 1, cls->CLSID, &sz); TRACE("loading class %s\n",debugstr_w(cls->CLSID)); @@ -435,6 +437,10 @@ static MSIEXTENSION *load_extension( MSIPACKAGE* package, MSIRECORD *row ) /* fill in the data */ ext = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MSIEXTENSION) ); + if (!ext) + return NULL; + + list_add_tail( &package->extensions, &ext->entry ); sz = 256; MSI_RecordGetStringW( row, 1, ext->Extension, &sz ); @@ -452,8 +458,6 @@ static MSIEXTENSION *load_extension( MSIPACKAGE* package, MSIRECORD *row ) buffer = MSI_RecordGetString(row,5); ext->Feature = get_loaded_feature( package, buffer ); - list_add_tail( &package->extensions, &ext->entry ); - return ext; }