diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 50d6272..6fabdf9 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -172,7 +172,7 @@ void nfc_init(nfc_context **context) { *context = nfc_context_new(); - if (!context) { + if (!*context) { perror("malloc"); return; }