diff options
author | Gerald Combs <gerald@wireshark.org> | 2019-12-18 09:14:52 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2019-12-18 17:34:24 +0000 |
commit | b044c5f1de14dc7b8fb54d431f2a695aafe6669a (patch) | |
tree | c579ebb1323ce7ee85534aac3cea947724512b87 /ui | |
parent | a9c79f0159be54aefec4b6705d48bdb0fb09513b (diff) |
Qt: Don't crash when disabling all protocols.
Ensure that a protocol can be disabled before attempting to do so. Fixes
crash described at
https://ask.wireshark.org/question/13573/wireshark-crashes-in-the-enabled-protocols-dialog-box/
Change-Id: Ib774bb6d636e82b79c5a922272a39126da85b71d
Reviewed-on: https://code.wireshark.org/review/35489
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/models/enabled_protocols_model.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/qt/models/enabled_protocols_model.cpp b/ui/qt/models/enabled_protocols_model.cpp index 668a4eccbf..d63c56ca57 100644 --- a/ui/qt/models/enabled_protocols_model.cpp +++ b/ui/qt/models/enabled_protocols_model.cpp @@ -31,6 +31,9 @@ public: protected: virtual void applyValuePrivate(gboolean value) { + if (! proto_can_toggle_protocol(proto_get_id(proto_)) || proto_is_pino(proto_)) { + return; + } proto_set_decoding(proto_get_id(proto_), value); } |