Qt: add more sanity checks in utils (found by clang).

Ensure the pointer exist before dereference them.

Change-Id: I7c2881c9c74b88517d01d9306507c14ff2a7b257
Reviewed-on: https://code.wireshark.org/review/25345
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Dario Lombardo 2018-01-16 17:28:56 +01:00 committed by Gerald Combs
parent 107a91a8cc
commit d77d5c9d20
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ FrameInformation::FrameInformation(CaptureFile * capfile, frame_data * fi, QObje
void FrameInformation::loadFrameTree()
{
if ( ! fi_ || ! cap_file_ )
if ( ! fi_ || ! cap_file_ || !cap_file_->capFile())
return;
if (!cf_read_record(cap_file_->capFile(), fi_))