summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuomas Virtanen <katajakasa@gmail.com>2019-05-30 22:11:33 +0300
committerTuomas Virtanen <katajakasa@gmail.com>2019-05-30 22:11:33 +0300
commit992a89b445d964266b1412bc1615eac1ee642054 (patch)
treec149588cb37cbe9da92228b18bc5f9ad7c9e8d0c
parentbdbdc1fbdda94fa643535fa021488923e215123e (diff)
Fix renderer creation error checking in examples
-rw-r--r--examples/example_complex.c2
-rw-r--r--examples/example_custom.c2
-rw-r--r--examples/example_rwops.c2
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;
}