src/video/SDL_video.c
changeset 3683 4c5ab6841fdc
parent 3678 8e961ef35d4b
child 3685 64ce267332c6
     1.1 --- a/src/video/SDL_video.c	Tue Jan 19 05:31:16 2010 +0000
     1.2 +++ b/src/video/SDL_video.c	Tue Jan 19 07:28:51 2010 +0000
     1.3 @@ -3580,7 +3580,7 @@
     1.4  void
     1.5  SDL_StartTextInput(void)
     1.6  {
     1.7 -    if (_this->StartTextInput) {
     1.8 +    if (_this && _this->StartTextInput) {
     1.9          _this->StartTextInput(_this);
    1.10      }
    1.11      SDL_EventState(SDL_TEXTINPUT, SDL_ENABLE);
    1.12 @@ -3590,7 +3590,7 @@
    1.13  void
    1.14  SDL_StopTextInput(void)
    1.15  {
    1.16 -    if (_this->StopTextInput) {
    1.17 +    if (_this && _this->StopTextInput) {
    1.18          _this->StopTextInput(_this);
    1.19      }
    1.20      SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
    1.21 @@ -3600,7 +3600,7 @@
    1.22  void
    1.23  SDL_SetTextInputRect(SDL_Rect *rect)
    1.24  {
    1.25 -    if (_this->SetTextInputRect) {
    1.26 +    if (_this && _this->SetTextInputRect) {
    1.27          _this->SetTextInputRect(_this, rect);
    1.28      }
    1.29  }