From 48ae1c5f28af5dc528edaa46067c5bd7b1ba16cb Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 17 Oct 2025 08:17:16 -0400 Subject: [PATCH] Only update storage DiskSpace if assigned an area --- scripts/ZoneMinder/lib/ZoneMinder/Event.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm index 05b174da5..1d94841f6 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm @@ -419,7 +419,7 @@ sub delete { $ZoneMinder::Database::dbh->commit() if ! $in_transaction; my $storage = $event->Storage(); - if ($event->DiskSpace()) { + if ($event->DiskSpace() and $storage->Id()) { $storage->lock_and_load(); $storage->save({DiskSpace=>$storage->DiskSpace()-$event->DiskSpace()}); }