aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-09-28 12:14:14 -0700
committerGerald Combs <gerald@wireshark.org>2020-09-28 12:14:14 -0700
commitb7c0dc3cb1725fc2d4bb5f6545e7f7ebf014030b (patch)
treece3219554e2b321b539106e32ea7b29d8a380a21 /ui
parent8b4e0148a231658ed7b420a4e98ffea9d6306a5e (diff)
Qt: Make sure the packet diagram always has a field value.
Have FieldInformation::toString return "[no value for field]" instead of an empty string so that the packet diagram always has something to display.
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/utils/field_information.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/utils/field_information.cpp b/ui/qt/utils/field_information.cpp
index 7dd1221084..01be5ba8f6 100644
--- a/ui/qt/utils/field_information.cpp
+++ b/ui/qt/utils/field_information.cpp
@@ -145,6 +145,10 @@ QString FieldInformation::toString()
repr = repr_str;
}
wmem_free(NULL, repr_str);
+
+ if (repr.isEmpty()) {
+ return "[no value for field]";
+ }
return repr;
}