summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 582c76b7..292c7160 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -342,7 +342,9 @@ int _alpm_trans_addtarget(pmtrans_t *trans, char *target)
int _alpm_trans_prepare(pmtrans_t *trans, alpm_list_t **data)
{
- *data = NULL;
+ if(data) {
+ *data = NULL;
+ }
ALPM_LOG_FUNC;