Qt: add assert (CID 1311486).
authorDario Lombardo <lomato@gmail.com>
Sat, 9 Jul 2016 22:17:03 +0000 (00:17 +0200)
committerAlexis La Goutte <alexis.lagoutte@gmail.com>
Sun, 10 Jul 2016 08:08:55 +0000 (08:08 +0000)
Change-Id: I62290f1f1c7856ee431705a64fae2022b850234a
Reviewed-on: https://code.wireshark.org/review/16361
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
ui/qt/service_response_time_dialog.cpp

index df166db0a074ddef4a5c3b54a19882d3be0f363b..4336a0bc3abaf4d51e22ef7b80966c61d17c4214 100644 (file)
@@ -320,9 +320,10 @@ const QString ServiceResponseTimeDialog::filterExpression()
         QTreeWidgetItem *ti = statsTreeWidget()->selectedItems()[0];
         if (ti->type() == srt_row_type_) {
             SrtTableTreeWidgetItem *srtt_ti = static_cast<SrtTableTreeWidgetItem *>(ti->parent());
+            g_assert(srtt_ti);
             QString field = srtt_ti->filterField();
             QString value = ti->text(SRT_COLUMN_INDEX);
-            if (srtt_ti && !field.isEmpty() && !value.isEmpty()) {
+            if (!field.isEmpty() && !value.isEmpty()) {
                 filter_expr = QString("%1==%2").arg(srtt_ti->filterField()).arg(value);
             }
         }