summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2006-10-23 16:05:27 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2006-10-23 16:05:27 +0000
commitc9d3bf338933f4119847dc5663cea88a2011d381 (patch)
treeed0b0f71c7a2b17aa513fb1ec06406bab24ffef1 /src
parent29063ce3c9abe64abc1d6279c5fe8f292ffba35f (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/rfid_reader.c2
1 files changed, 2 insertions, 0 deletions
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);
}
personal git repositories of Harald Welte. Your mileage may vary