aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/megaco_stat.c5
-rw-r--r--tap-megacostat.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gtk/megaco_stat.c b/gtk/megaco_stat.c
index 5a0692ff4b..96d5cc624f 100644
--- a/gtk/megaco_stat.c
+++ b/gtk/megaco_stat.c
@@ -156,6 +156,11 @@ gtk_megacostat_init(const char *optarg, void *userdata _U_)
megaco_ctx_track = prefs_find_preference(prefs_find_module("megaco"),"ctx_info");
h248_ctx_track = prefs_find_preference(prefs_find_module("h248"),"ctx_info");
+ if (!megaco_ctx_track || !h248_ctx_track) {
+ /* No such preferences */
+ return;
+ }
+
if (!*megaco_ctx_track->varp.boolp || !*h248_ctx_track->varp.boolp) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", "Track Context option at Protocols -> MEGACO and Protocols -> H248 preferences has to be set to true to enable measurement of service reponse times.");
return;
diff --git a/tap-megacostat.c b/tap-megacostat.c
index d4316daba7..6e5186c688 100644
--- a/tap-megacostat.c
+++ b/tap-megacostat.c
@@ -87,6 +87,12 @@ megacostat_init(const char *optarg, void* userdata _U_)
megaco_ctx_track = prefs_find_preference(prefs_find_module("megaco"),"ctx_info");
h248_ctx_track = prefs_find_preference(prefs_find_module("h248"),"ctx_info");
+
+ if (!megaco_ctx_track || !h248_ctx_track) {
+ /* No such preferences */
+ return;
+ }
+
if (!*megaco_ctx_track->varp.boolp || !*h248_ctx_track->varp.boolp) {
printf("Track Context option at Protocols -> MEGACO and Protocols -> H248 preferences\n");
printf("has to be set to true to enable measurement of service response times.\n");