Signed-off-by: Alon Levy <al...@redhat.com>
---
 block/qcow2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/qcow2.c b/block/qcow2.c
index 1f99866..260a1d3 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -512,7 +512,9 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, 
int flags)
 
     /* Enable lazy_refcounts according to image and command line options */
     opts = qemu_opts_create_nofail(&qcow2_runtime_opts);
-    qemu_opts_absorb_qdict(opts, options, &local_err);
+    if (options) {
+        qemu_opts_absorb_qdict(opts, options, &local_err);
+    }
     if (error_is_set(&local_err)) {
         qerror_report_err(local_err);
         error_free(local_err);
-- 
1.8.1.4


Reply via email to