--- a/src/corelib/io/qprocess.cpp Tue Jan 26 12:42:25 2010 +0200
+++ b/src/corelib/io/qprocess.cpp Tue Feb 02 00:43:10 2010 +0200
@@ -275,7 +275,7 @@
*/
bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
{
- return d->hash == other.d->hash;
+ return d == other.d || (d && other.d && d->hash == other.d->hash);
}
/*!
@@ -334,6 +334,7 @@
*/
void QProcessEnvironment::insert(const QString &name, const QString &value)
{
+ // d detaches from null
d->hash.insert(prepareName(name), prepareValue(value));
}