aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-03-07 13:30:46 +0100
committerPeter Wu <peter@lekensteyn.nl>2015-03-08 21:54:52 +0000
commit758ee3dc899ecd7b0de9179fc4d4d7a88e05d27e (patch)
tree2a6a111093e10c280dfa0ef8aec74b4b5f9a2f8b /ui
parent27ff75c548764fc277a96490cb2fa014f3775c3d (diff)
Qt: fix use of uninitialized variable
Fixes error reported by UBSan: ui/qt/packet_list.cpp:537:13: runtime error: load of value 190, which is not a valid value for type 'bool' The method is apparently called earlier for other timers, resulting in an error on startup. Initialize rows_inserted_ to avoid warnings when the event is triggered later. Change-Id: Iad919d79264ff1c3c17c9458c869d584234fcd5d Reviewed-on: https://code.wireshark.org/review/7575 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/packet_list.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index 89749442ca..555a15881e 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -229,7 +229,8 @@ PacketList::PacketList(QWidget *parent) :
decode_as_(NULL),
ctx_column_(-1),
capture_in_progress_(false),
- tail_timer_id_(0)
+ tail_timer_id_(0),
+ rows_inserted_(false)
{
QMenu *submenu, *subsubmenu;
QAction *action;