]> granicus.if.org Git - yasm/commitdiff
With dynamic linking, it's possible for the default object format to not load,
authorPeter Johnson <peter@tortall.net>
Mon, 23 Sep 2002 03:00:49 +0000 (03:00 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 23 Sep 2002 03:00:49 +0000 (03:00 -0000)
so error out with message instead of asserting.

svn path=/trunk/yasm/; revision=703

frontends/yasm/yasm.c
src/main.c

index fb4e9fe569e3f0929b69f35e348483328645da45..9c54aeee8802cd4d09434d2aa6b4468a4152421c 100644 (file)
@@ -206,7 +206,11 @@ main(int argc, char *argv[])
     /* If not already specified, default to dbg as the object format. */
     if (!cur_objfmt)
        cur_objfmt = find_objfmt("dbg");
-    assert(cur_objfmt != NULL);
+
+    if (!cur_objfmt) {
+       ErrorNow(_("Could not load default object format"));
+       return EXIT_FAILURE;
+    }
 
     /* handle preproc-only case here */
     if (preproc_only) {
index fb4e9fe569e3f0929b69f35e348483328645da45..9c54aeee8802cd4d09434d2aa6b4468a4152421c 100644 (file)
@@ -206,7 +206,11 @@ main(int argc, char *argv[])
     /* If not already specified, default to dbg as the object format. */
     if (!cur_objfmt)
        cur_objfmt = find_objfmt("dbg");
-    assert(cur_objfmt != NULL);
+
+    if (!cur_objfmt) {
+       ErrorNow(_("Could not load default object format"));
+       return EXIT_FAILURE;
+    }
 
     /* handle preproc-only case here */
     if (preproc_only) {