From 45459d5a34608d447367b595c865349f0a77239d Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 2 Jan 2013 00:50:57 +0100 Subject: [PATCH] Fixed invalid order of operations. --- tests/iconify.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/iconify.c b/tests/iconify.c index 964e9274..26272939 100644 --- a/tests/iconify.c +++ b/tests/iconify.c @@ -100,6 +100,11 @@ int main(int argc, char** argv) GLFWmonitor monitor = NULL; GLFWwindow window; + glfwSetErrorCallback(error_callback); + + if (!glfwInit()) + exit(EXIT_FAILURE); + while ((ch = getopt(argc, argv, "fh")) != -1) { switch (ch) @@ -118,11 +123,6 @@ int main(int argc, char** argv) } } - glfwSetErrorCallback(error_callback); - - if (!glfwInit()) - exit(EXIT_FAILURE); - if (monitor) { GLFWvidmode mode;