diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2017-01-10 23:47:29 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-01-11 02:24:36 +0000 |
commit | ebd198979f3b334688914e631a8899f5090e4503 (patch) | |
tree | f01647b70760d0826fc6386a03f17bbe6e8cd80c /ui/qt | |
parent | 37790e90f52b4c08d2a5dd8c4ff0e0cab4913880 (diff) |
Qt: check NULL before dereference (CID 1394324)
Move the NULL check before the assignment with the dereference.
Change-Id: Ifcd4fb89c059ad2f4b6606fc1e83dc67a7d7373d
Reviewed-on: https://code.wireshark.org/review/19605
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/voip_calls_dialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/voip_calls_dialog.cpp b/ui/qt/voip_calls_dialog.cpp index e41014ec7f..267ec218cc 100644 --- a/ui/qt/voip_calls_dialog.cpp +++ b/ui/qt/voip_calls_dialog.cpp @@ -86,11 +86,11 @@ public: } void drawData() { - guint callDuration = nstime_to_sec(&(call_info_->stop_fd->abs_ts)) - nstime_to_sec(&(call_info_->start_fd->abs_ts)); if (!call_info_) { setText(start_time_col_, QObject::tr("Error")); return; } + guint callDuration = nstime_to_sec(&(call_info_->stop_fd->abs_ts)) - nstime_to_sec(&(call_info_->start_fd->abs_ts)); if (mTimeOfDay_) { setText(start_time_col_, QDateTime::fromTime_t(nstime_to_sec(&(call_info_->start_fd->abs_ts))).toTimeSpec(Qt::LocalTime).toString("yyyy-MM-dd hh:mm:ss")); |