Mercurial > sdl-ios-xcode
diff src/video/qnxgf/SDL_gf_input.c @ 3461:87182c69e080
Deinitialization fixes, in case if QNXGF driver is not initialized properly.
author | Mike Gorchak <lestat@i.com.ua> |
---|---|
date | Fri, 20 Nov 2009 07:06:50 +0000 |
parents | 7f684f249ec9 |
children | 4b594623401b |
line wrap: on
line diff
--- a/src/video/qnxgf/SDL_gf_input.c Thu Nov 19 09:07:09 2009 +0000 +++ b/src/video/qnxgf/SDL_gf_input.c Fri Nov 20 07:06:50 2009 +0000 @@ -1071,6 +1071,7 @@ status = hidd_connect(&hidparams, &connection); if (status != EOK) { + connection=NULL; return -1; } @@ -1097,6 +1098,7 @@ /* Disconnect from HID server */ status = hidd_disconnect(connection); if (status != EOK) { + connection=NULL; return -1; } @@ -1105,6 +1107,7 @@ status = hidd_connect(&hidparams, &connection); if (status != EOK) { + connection=NULL; return -1; } @@ -1119,9 +1122,12 @@ hiddi_disable_mouse(); /* Disconnect from HID server */ - status = hidd_disconnect(connection); - if (status != EOK) { - return -1; + if (connection!=NULL) + { + status = hidd_disconnect(connection); + if (status != EOK) { + return -1; + } } }