summaryrefslogtreecommitdiff
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index c0eeb421..0a68a2bc 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -145,6 +145,11 @@ int trans_prepare(pmtrans_t *trans, PMList **data)
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
+ /* If there's nothing to do, return without complaining */
+ if(trans->packages == NULL) {
+ return(0);
+ }
+
switch(trans->type) {
case PM_TRANS_TYPE_ADD:
case PM_TRANS_TYPE_UPGRADE: