From 974a00bc5f42d11da1b0f27a4c2d399147a07f10 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Thu, 6 Aug 2009 14:50:51 +0300 Subject: state, update: fixes --- src/state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index d886754..1b1b333 100644 --- a/src/state.c +++ b/src/state.c @@ -502,7 +502,9 @@ int apk_state_lock_name(struct apk_state *state, } /* If the chosen package is installed, all is done here */ - if (oldpkg == newpkg && !(newpkg->name->flags & APK_NAME_REINSTALL)) + if (oldpkg == newpkg && + (newpkg == NULL || + !(newpkg->name->flags & APK_NAME_REINSTALL))) return 0; /* Track change */ -- cgit v1.2.3-60-g2f50