mifare classic:
[librfid] / src / rfid_reader.c
index af947ac..e0f0d3d 100644 (file)
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
 #include <stdlib.h>
@@ -43,6 +43,8 @@ rfid_reader_open(void *data, unsigned int id)
        }
 
        p = rfid_readers[id];
+       if (!p)
+               return NULL;
 
        return p->open(data);
 }