defensive coding

This commit is contained in:
Aaron Culliney 2015-05-21 22:31:06 -07:00
parent df218fed05
commit 13a7dbfbb0

View File

@ -228,6 +228,10 @@ static void gltouchjoy_setup(void) {
LOG("gltouchjoy not initializing axis");
return;
}
if (!axes.model->custom) {
LOG("gltouchjoy axes initialization problem");
return;
}
// button object
@ -240,6 +244,10 @@ static void gltouchjoy_setup(void) {
LOG("gltouchjoy not initializing buttons");
return;
}
if (!buttons.model->custom) {
LOG("gltouchjoy buttons initialization problem");
return;
}
clock_gettime(CLOCK_MONOTONIC, &axes.timingBegin);
clock_gettime(CLOCK_MONOTONIC, &buttons.timingBegin);