diff options
author | Robert Löhning <robert.loehning@qt.io> | 2024-05-06 16:56:47 +0200 |
---|---|---|
committer | Robert Löhning <robert.loehning@qt.io> | 2024-05-07 13:11:00 +0200 |
commit | 9ea3e687875c74473150131d70152bb094dfaa60 (patch) | |
tree | 17fcd3d194eaccf4f4186cf3e31c64398acddf19 | |
parent | e47bbb0c88101a9b53f061bde097d3725278fe71 (diff) |
Reduce local variable's scope
Change-Id: I31db971590f69e77202fe7f570a189a02185d7b4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
-rw-r--r-- | src/svg/qsvghandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 9db7d64..8320d1f 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -1347,9 +1347,9 @@ static void parseFont(QSvgNode *node, attributes.fontWeight.isEmpty() && attributes.fontVariant.isEmpty() && attributes.textAnchor.isEmpty()) return; - QSvgTinyDocument *doc = node->document(); QSvgFontStyle *fontStyle = nullptr; if (!attributes.fontFamily.isEmpty()) { + QSvgTinyDocument *doc = node->document(); if (doc) { QSvgFont *svgFont = doc->svgFont(attributes.fontFamily.toString()); if (svgFont) |