fix for a critical when a module returns NULL on opening

Original commit message from CVS:
fix for a critical when a module returns NULL on opening
1 file changed