1
0
mirror of https://github.com/raphnet/gc_n64_usb-v3 synced 2025-02-21 21:31:50 -05:00

Fix null pointer dereference

This commit is contained in:
Raphael Assenat 2015-12-08 21:54:08 -05:00
parent cc3ca163c4
commit 019301b7b2

2
main.c

@ -321,7 +321,7 @@ int main(void)
/* Try to auto-detect controller if none*/
if (!pad) {
pad = detectPad();
if (pad->hotplug) {
if (pad && (pad->hotplug)) {
// For gamecube, this make sure the next
// analog values we read become the center
// reference.