Don't try to use gtk when it is not initialized.
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Fri, 18 Oct 2013 16:22:33 +0000 (12:22 -0400)
committerKevin Wasserman <kevin.wasserman@painless-security.com>
Fri, 18 Oct 2013 16:22:33 +0000 (12:22 -0400)
src/moonshot-identity-manager-app.vala
src/moonshot-utils.vala

index c8ad666..52251ca 100644 (file)
@@ -354,6 +354,7 @@ public static int main(string[] args){
                 stdout.printf(_("Run '%s --help' to see a full list of available options\n"), args[0]);
                 return -1;
             }
+            gtk_available = true;
         }
 
 #if OS_WIN32
index b6e4410..5f59343 100644 (file)
@@ -14,8 +14,12 @@ public Gdk.Pixbuf? find_icon_sized (string name, Gtk.IconSize icon_size)
  * load them manually.
  */
 
+public bool gtk_available = false;
+
 public Gdk.Pixbuf? find_icon (string name, int size)
 {
+    if (!gtk_available)
+        return null;
     try
     {
 #if OS_WIN32