From c9d3bf338933f4119847dc5663cea88a2011d381 Mon Sep 17 00:00:00 2001 From: laforge Date: Mon, 23 Oct 2006 16:05:27 +0000 Subject: graceful error in case of non-existing reader backend driver git-svn-id: https://svn.gnumonks.org/trunk/librfid@1914 e0336214-984f-0b4b-a45f-81c69e1f0ede --- src/rfid_reader.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/rfid_reader.c b/src/rfid_reader.c index af947ac..a8e4001 100644 --- a/src/rfid_reader.c +++ b/src/rfid_reader.c @@ -43,6 +43,8 @@ rfid_reader_open(void *data, unsigned int id) } p = rfid_readers[id]; + if (!p) + return NULL; return p->open(data); } -- cgit v1.2.3