Revision: 40126
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40126
Author:   campbellbarton
Date:     2011-09-11 13:46:58 +0000 (Sun, 11 Sep 2011)
Log Message:
-----------
fix for 'blender -E' crashing.

Modified Paths:
--------------
    trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c      2011-09-11 13:23:30 UTC (rev 
40125)
+++ trunk/blender/source/creator/creator.c      2011-09-11 13:46:58 UTC (rev 
40126)
@@ -542,22 +542,17 @@
 static int set_engine(int argc, const char **argv, void *data)
 {
        bContext *C = data;
-       if (argc >= 1)
-       {
-               if (!strcmp(argv[1],"help"))
-               {
+       if (argc >= 2) {
+               if (!strcmp(argv[1], "help")) {
                        RenderEngineType *type = NULL;
-
-                       for( type = R_engines.first; type; type = type->next )
-                       {
+                       printf("Blender Engine Listing:\n");
+                       for( type = R_engines.first; type; type = type->next ) {
                                printf("\t%s\n", type->idname);
                        }
                        exit(0);
                }
-               else
-               {
-                       if (CTX_data_scene(C)==NULL)
-                       {
+               else {
+                       if (CTX_data_scene(C)==NULL) {
                                printf("\nError: no blend loaded. order the 
arguments so '-E  / --engine ' is after a blend is loaded.\n");
                        }
                        else {
@@ -574,7 +569,7 @@
        }
        else
        {
-               printf("\nEngine not specified.\n");
+               printf("\nEngine not specified, give 'help' for a list of 
available engines.\n");
                return 0;
        }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to