]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix Solaris crash.
authorNicolas Boichat <nicolas@boichat.ch>
Fri, 24 Sep 2004 10:34:56 +0000 (10:34 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Fri, 24 Sep 2004 10:34:56 +0000 (10:34 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1611 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/tray-monitor/tray-monitor.c

index be1d003ef0b146c47861bd7ebf6ee5cf01c19652..4531d34f5aede7dbbfb6d6a58773f73e66b032cf 100644 (file)
@@ -150,6 +150,8 @@ int main(int argc, char *argv[])
    working_directory = "/tmp";
    args = get_pool_memory(PM_FNAME);
 
+   gtk_init (&argc, &argv);
+
    while ((ch = getopt(argc, argv, "bc:d:th?f:s:")) != -1) {
       switch (ch) {
       case 'c':                    /* configuration file */
@@ -178,7 +180,7 @@ int main(int argc, char *argv[])
       }  
    }
    argc -= optind;
-   argv += optind;
+   //argv += optind;
 
    if (argc) {
       usage();
@@ -256,8 +258,6 @@ Without that I don't how to get status from the File, Storage or Director Daemon
 This value must be greater or equal to 1 second and less or equal to 10 minutes (read value: %d).\n"), configfile, monitor->RefreshInterval);
    }
    
-   gtk_init (&argc, &argv);
-   
    GdkPixbuf* pixbuf = gdk_pixbuf_new_from_xpm_data(generateXPM(warn, warn));
    // This should be ideally replaced by a completely libpr0n-based icon rendering.
    mTrayIcon = egg_status_icon_new_from_pixbuf(pixbuf);