From ec21dc3c6b03faa1e1e8d52fb3ee8093dab50cc3 Mon Sep 17 00:00:00 2001
From: Sergey Avilov <throttle10@protonmail.com>
Date: Wed, 28 Jun 2017 17:06:47 +0300
Subject: package_daemon: fix crash on system update
We can't delete old volume state while it's still active and can be accessed until reboot.
Fixes #10898
---
src/servers/package/Volume.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/servers/package/Volume.cpp b/src/servers/package/Volume.cpp
index f6ae125acf..2cf2948d52 100644
a
|
b
|
Volume::_SetLatestState(VolumeState* state, bool isActive)
|
1238 | 1238 | fActiveState = state; |
1239 | 1239 | } |
1240 | 1240 | |
1241 | | delete fLatestState; |
| 1241 | if (fLatestState != fActiveState) |
| 1242 | delete fLatestState; |
1242 | 1243 | fLatestState = state; |
1243 | 1244 | fChangeCount++; |
1244 | 1245 | |