From 4b30113f6017726c6ccb8f6fef2dbe99ac00eaa0 Mon Sep 17 00:00:00 2001 From: Brian Taylor Date: Thu, 2 Mar 2023 12:19:53 -0800 Subject: [PATCH] Check current_subckt is set when printing TRANS_OUT. --- src/frontend/udevices.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/udevices.c b/src/frontend/udevices.c index 6ef3b11b5..7bd0b50d2 100644 --- a/src/frontend/udevices.c +++ b/src/frontend/udevices.c @@ -776,7 +776,7 @@ struct card *replacement_udevice_cards(void) translated_p = add_xlator(translated_p, x); } - if (ps_port_directions & 2) { + if (current_subckt && (ps_port_directions & 2)) { char *tmp = NULL, *pos = NULL, *posp = NULL; tmp = TMALLOC(char, strlen(current_subckt) + 1); (void) memcpy(tmp, current_subckt, strlen(current_subckt) + 1); @@ -809,7 +809,7 @@ struct card *replacement_udevice_cards(void) nextcard = insert_new_line(nextcard, new_str, 0, 0); } } - if (ps_port_directions & 2) { + if (current_subckt && (ps_port_directions & 2)) { char *p1 = NULL, *p2 = NULL; DS_CREATE(tmpds, 64); p1 = strstr(current_subckt, ".subckt");