aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--savevm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index e0491e7580..03fc4d93bf 100644
--- a/savevm.c
+++ b/savevm.c
@@ -662,7 +662,7 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset,
offset, size, bytes_sent);
if (ret != RAM_SAVE_CONTROL_DELAYED) {
- if (*bytes_sent > 0) {
+ if (bytes_sent && *bytes_sent > 0) {
qemu_update_position(f, *bytes_sent);
} else if (ret < 0) {
qemu_file_set_error(f, ret);