summaryrefslogtreecommitdiffstats
path: root/src/xml/sax
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml/sax')
-rw-r--r--src/xml/sax/qxml.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 0c7f2ab..c4c5f0c 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -1321,7 +1321,8 @@ QXmlInputSource::QXmlInputSource(QIODevice *dev)
{
init();
d->inputDevice = dev;
- d->inputDevice->setTextModeEnabled(false);
+ if (dev->isOpen())
+ d->inputDevice->setTextModeEnabled(false);
}
#ifdef QT3_SUPPORT