sg engine: do type check only when sd has been setup
authorJens Axboe <jens.axboe@oracle.com>
Mon, 2 Apr 2007 08:51:10 +0000 (10:51 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 2 Apr 2007 08:51:10 +0000 (10:51 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/sg.c

index 44e151b65ead24c0d7ffc6040369f74ad79b2fd6..3462688a8d5295980bb6204c56f77581825989ea 100644 (file)
@@ -390,7 +390,7 @@ static int fio_sgio_open(struct thread_data *td, struct fio_file *f)
        if (ret)
                return ret;
 
-       if (!sd->type_checked && fio_sgio_type_check(td, f)) {
+       if (sd && !sd->type_checked && fio_sgio_type_check(td, f)) {
                generic_close_file(td, f);
                return 1;
        }