diff options
author | Tuomas Virtanen <katajakasa@gmail.com> | 2019-05-30 22:11:33 +0300 |
---|---|---|
committer | Tuomas Virtanen <katajakasa@gmail.com> | 2019-05-30 22:11:33 +0300 |
commit | 992a89b445d964266b1412bc1615eac1ee642054 (patch) | |
tree | c149588cb37cbe9da92228b18bc5f9ad7c9e8d0c | |
parent | bdbdc1fbdda94fa643535fa021488923e215123e (diff) |
Fix renderer creation error checking in examples
-rw-r--r-- | examples/example_complex.c | 2 | ||||
-rw-r--r-- | examples/example_custom.c | 2 | ||||
-rw-r--r-- | examples/example_rwops.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/example_complex.c b/examples/example_complex.c index 779c879..8af8c3a 100644 --- a/examples/example_complex.c +++ b/examples/example_complex.c @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) { // Create an accelerated renderer. Enable vsync, so we don't need to play around with SDL_Delay. renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC); - if(window == NULL) { + if(renderer == NULL) { fprintf(stderr, "Unable to create a renderer!\n"); return 1; } diff --git a/examples/example_custom.c b/examples/example_custom.c index 8844b79..c02f7dc 100644 --- a/examples/example_custom.c +++ b/examples/example_custom.c @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) { // Create an accelerated renderer. Enable vsync, so we don't need to play around with SDL_Delay. renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC); - if(window == NULL) { + if(renderer == NULL) { fprintf(stderr, "Unable to create a renderer!\n"); return 1; } diff --git a/examples/example_rwops.c b/examples/example_rwops.c index 96a3655..9aa6d96 100644 --- a/examples/example_rwops.c +++ b/examples/example_rwops.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) { // Create an accelerated renderer. Enable vsync, so we don't need to play around with SDL_Delay. renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC); - if(window == NULL) { + if(renderer == NULL) { fprintf(stderr, "Unable to create a renderer!\n"); return 1; } |