Qt: Enable Analyze -> Conversation Filter

Exit early if there is no color rule before setting the parent menu enabled/disabled.

Bug: 12458
Change-Id: I37dc093681d3dc28afb60df7fd45e49ab804b2a1
Reviewed-on: https://code.wireshark.org/review/15538
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
D. Ulis 2016-05-22 14:46:11 -04:00 committed by Gerald Combs
parent 6308d57444
commit 39c8e7e313
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ void ConversationAction::setPacketInfo(struct _packet_info *pinfo)
// If we're the "New Coloring Rule" item, enable or disable our parent menu.
QMenu *parent_submenu = qobject_cast<QMenu *>(parentWidget());
if (color_number_ > 0 || !parent_submenu) return;
if (color_number_ < 0 || !parent_submenu) return;
parent_submenu->setEnabled(enable);
}