aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremias Stotter <jeremias@stotter.eu>2024-04-16 20:06:47 +0200
committerJeremias Stotter <jeremias@stotter.eu>2024-04-16 20:06:47 +0200
commitbf3e6d38876803db0d9f13e3fe313b89719ff9eb (patch)
treedd08f5bec6a861f783c0b533e066c2a34cc7bd88
parentd91ea325a9b232f1ebf363188e4b1bce99c685c0 (diff)
downloadnetwork-simulator-master.tar.gz
network-simulator-master.tar.bz2
network-simulator-master.zip
Fix a crashHEADmaster
-rw-r--r--gui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gui.c b/gui.c
index 565efea..55074ce 100644
--- a/gui.c
+++ b/gui.c
@@ -1309,9 +1309,10 @@ void gui_con_send(struct connection* con, int send_side) {
struct interface* inter = (send_side == 1) ? con->interface1 : con->interface2;
int gui_index = inter->start_queue->gui_index;
GObject* data_object = g_list_model_get_object(G_LIST_MODEL(packet_list_store), gui_index);
-
- g_object_set_data(data_object, "Status", "Sent");
- *(int*)g_object_get_data(data_object, "Timestamp") = timestamp;
+ if(data_object) {
+ g_object_set_data(data_object, "Status", "Sent");
+ *(int*)g_object_get_data(data_object, "Timestamp") = timestamp;
+ }
}
}
Jeremias Stotters git repositories generated by CGIT