summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Löhning <robert.loehning@qt.io>2024-05-06 16:56:47 +0200
committerRobert Löhning <robert.loehning@qt.io>2024-05-07 13:11:00 +0200
commit9ea3e687875c74473150131d70152bb094dfaa60 (patch)
tree17fcd3d194eaccf4f4186cf3e31c64398acddf19
parente47bbb0c88101a9b53f061bde097d3725278fe71 (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.cpp2
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)