pgw: Avoid access to unbound global variable

This happens if GTv2C failed prior:
"""
11:30:17.577738 15 PGW_Tests.ttcn:645 setverdict(fail): none -> fail reason: "Unexpected GTPv2 while waiting for CreateSessionResp", new component reason: "Une
xpected GTPv2 while waiting for CreateSessionResp"
11:30:17.578004 15 PGW_Tests.ttcn:756 Dynamic test case error: Initializing a TTCN_Buffer with an unbound octetstring value.
"""

Change-Id: I9731b755ddc7bb3ebd56bdec550961cc36f2e2c6
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index b8c363b..8a25ebf 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -753,6 +753,10 @@
 private function f_ping4(charstring host, integer interval := 1, integer count := 10) runs on PGW_Session_CT
 {
 	var charstring ping :="ping -c " & int2str(count) & " -i " & int2str(interval);
+
+	if (not isbound(g_ip4_addr)) {
+		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "f_ping4(): g_ip4_addr is unset!");
+	}
 	ping := ping & " -I " & f_inet_ntoa(g_ip4_addr);
 	ping := ping & " " & host;
 	f_start_prog_wait(ping, tout := int2float(5 + interval*count));