add check to make sure resource exists

master
Chris Cromer 4 years ago
parent 23051f4a8c
commit a1225763d6
Signed by: cromer
GPG Key ID: 39CC813FF3C8708A
  1. 9
      src/addtax.c

@ -8,7 +8,7 @@
#define _(STRING) gettext(STRING)
#define TAX 1.111111111
#define VERSION "1.0.0"
#define VERSION "1.0.1"
GtkLabel *calculated_value = NULL;
@ -71,11 +71,16 @@ int main(int argc, char *argv[]) {
GtkBuilder *builder;
GtkWidget *window;
GError *error = NULL;
gtk_init(&argc, &argv);
builder = gtk_builder_new();
gtk_builder_add_from_resource(builder, "/cl/cromer/addtax/window_main.glade", NULL);
gtk_builder_add_from_resource(builder, "/cl/cromer/addtax/window_main.glade", &error);
if (error != NULL) {
fprintf(stderr, "Error: %s\n", error->message);
return 1;
}
window = GTK_WIDGET(gtk_builder_get_object(builder, "window_main"));
gtk_builder_connect_signals(builder, NULL);

Loading…
Cancel
Save