src/video/SDL_video.c
changeset 7721 bdf8c2c84e14
parent 7720 f9a649383362
child 7723 aea98cc3e696
equal deleted inserted replaced
7720:f9a649383362 7721:bdf8c2c84e14
  1451     SDL_WindowUserData *prev, *data;
  1451     SDL_WindowUserData *prev, *data;
  1452 
  1452 
  1453     CHECK_WINDOW_MAGIC(window, NULL);
  1453     CHECK_WINDOW_MAGIC(window, NULL);
  1454 
  1454 
  1455     /* Input validation */
  1455     /* Input validation */
  1456     if (name == NULL || SDL_strlen(name) == 0) {
  1456     if (name == NULL || name[0] == '\0') {
  1457       SDL_InvalidParamError("name");
  1457       SDL_InvalidParamError("name");
  1458       return NULL;
  1458       return NULL;
  1459     }
  1459     }
  1460 
  1460 
  1461     /* See if the named data already exists */
  1461     /* See if the named data already exists */
  1498     SDL_WindowUserData *data;
  1498     SDL_WindowUserData *data;
  1499 
  1499 
  1500     CHECK_WINDOW_MAGIC(window, NULL);
  1500     CHECK_WINDOW_MAGIC(window, NULL);
  1501 
  1501 
  1502     /* Input validation */
  1502     /* Input validation */
  1503     if (name == NULL || SDL_strlen(name) == 0) {
  1503     if (name == NULL || name[0] == '\0') {
  1504       SDL_InvalidParamError("name");
  1504       SDL_InvalidParamError("name");
  1505       return NULL;
  1505       return NULL;
  1506     }
  1506     }
  1507 
  1507 
  1508     for (data = window->data; data; data = data->next) {
  1508     for (data = window->data; data; data = data->next) {