Index: src/emx/src/lib/sys/b_ldrOpen.c
===================================================================
--- src/emx/src/lib/sys/b_ldrOpen.c	(revision 3803)
+++ src/emx/src/lib/sys/b_ldrOpen.c	(working copy)
@@ -60,6 +60,14 @@
     int         rc;
 
     /*
+     * Access to main program is not supported.
+     */
+    if (pszLibrary == NULL)
+    {
+        LIBCLOG_ERROR_RETURN_INT(ERROR_INVALID_PARAMETER);
+    }
+
+    /*
      * Resolve the path if one is given.  Ignore failures to resolve the file
      * name is it may lack the extension (I think) - DosLoadModule will fail,
      * so no problem.
