elftosb: fix crash on invalid command file

Change-Id: Ifef61b7ca6a391960d1d696ba455e0d14462c967
diff --git a/utils/imxtools/sbtools/elftosb.c b/utils/imxtools/sbtools/elftosb.c
index b65b65d..2a96aec 100644
--- a/utils/imxtools/sbtools/elftosb.c
+++ b/utils/imxtools/sbtools/elftosb.c
@@ -432,6 +432,8 @@
     }
 
     struct cmd_file_t *cmd_file = db_parse_file(cmd_filename);
+    if(cmd_file == NULL)
+        bug("Error parsing command file\n");
     struct sb_file_t *sb_file = apply_cmd_file(cmd_file);
     db_free(cmd_file);