diff options
author | Richard Hughes <richard@hughsie.com> | 2013-08-27 10:20:13 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2013-08-27 10:20:13 +0100 |
commit | d637d1acd121adb986032305956e143e81d0e5bc (patch) | |
tree | 766cd9d93a3e50840f919029091251c601e3f91a | |
parent | 9a024488739647316e84dd821c1d127c717dc5ff (diff) | |
download | colord-d637d1acd121adb986032305956e143e81d0e5bc.tar.gz |
Fix creation of the dummy sensor device
We were checking the local variable before it had been set.
-rw-r--r-- | src/cd-main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cd-main.c b/src/cd-main.c index 242af6b..a10d08c 100644 --- a/src/cd-main.c +++ b/src/cd-main.c @@ -2661,9 +2661,6 @@ main (int argc, char *argv[]) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); - priv = g_new0 (CdMainPrivate, 1); - priv->create_dummy_sensor = create_dummy_sensor; - /* TRANSLATORS: program name */ g_set_application_name (_("Color Management")); context = g_option_context_new (NULL); @@ -2674,6 +2671,8 @@ main (int argc, char *argv[]) g_option_context_free (context); /* create new objects */ + priv = g_new0 (CdMainPrivate, 1); + priv->create_dummy_sensor = create_dummy_sensor; priv->loop = g_main_loop_new (NULL, FALSE); priv->devices_array = cd_device_array_new (); priv->profiles_array = cd_profile_array_new (); |