quiet some compiler warnings & fix possible (but unlikely) crash.
[blender.git] / source / blender / blenlib / intern / BLI_args.c
index 7bc93a3d3a0b07268144137eba66b7e80a782366..5f31565d65bc03bcecb4bf3462875748fc4c926d 100644 (file)
@@ -290,8 +290,10 @@ void BLI_argsParse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *
                                        }
                                        i += retval;
                                } else if (retval == -1){
-                                       if (a->key->pass != -1)
-                                               ba->passes[i] = pass;
+                                       if (a) {
+                                               if (a->key->pass != -1)
+                                                       ba->passes[i] = pass;
+                                       }
                                        break;
                                }
                        }