summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-08 23:42:48 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-06-19 16:27:16 +0000
commit121d88ee663ab3dffdcbc207135137c3fb0c8ef9 (patch)
treeea3360a53fa916e9b5995e7eec42c7d78fedd877 /src
parentb934cf056e3875a13af48eefe519cffe1332cde2 (diff)
Fix goto bypassing variable initialization
Though it's a pointer. Task-number: QTBUG-60464 Change-Id: Ia3e896da908f42939148fffd14c660fd8da43aa2 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/directshow/player/directshowmetadatacontrol.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/directshow/player/directshowmetadatacontrol.cpp b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
index 1f75e334..84f99083 100644
--- a/src/plugins/directshow/player/directshowmetadatacontrol.cpp
+++ b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
@@ -624,9 +624,7 @@ void DirectShowMetaDataControl::updateMetadata(IFilterGraph2 *graph, IBaseFilter
#endif
#if QT_CONFIG(wmsdk)
- IWMHeaderInfo *info = com_cast<IWMHeaderInfo>(source, IID_IWMHeaderInfo);
-
- if (info) {
+ if (IWMHeaderInfo *info = com_cast<IWMHeaderInfo>(source, IID_IWMHeaderInfo)) {
const auto keys = *qt_wmMetaDataKeys();
for (const QWMMetaDataKey &key : keys) {
QVariant var = getValue(info, key.wmName);