aboutsummaryrefslogtreecommitdiff
path: root/src/target.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target.c')
-rw-r--r--src/target.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target.c b/src/target.c
index a28c55f..b46f9e3 100644
--- a/src/target.c
+++ b/src/target.c
@@ -75,7 +75,8 @@ target *target_attach(target *t, target_destroy_callback destroy_cb)
t->destroy_callback = destroy_cb;
- t->attach(t);
+ if (!t->attach(t))
+ return NULL;
return t;
}