summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/environmentvariablesoperation.cpp
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-05-23 13:16:06 +0200
committerkh1 <qt-info@nokia.com>2011-05-23 13:16:06 +0200
commit406263bbc7d29da932ef17395a2f1270d8b47947 (patch)
tree4fd98a3178c5e2e26adc38477eacbeb448c37498 /installerbuilder/libinstaller/environmentvariablesoperation.cpp
parentdc8e2a6953c1039bb2f0ca7f84efbd336fa9dbbd (diff)
Fix a crash seen while accessing a deleted object.
Diffstat (limited to 'installerbuilder/libinstaller/environmentvariablesoperation.cpp')
-rw-r--r--installerbuilder/libinstaller/environmentvariablesoperation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/installerbuilder/libinstaller/environmentvariablesoperation.cpp b/installerbuilder/libinstaller/environmentvariablesoperation.cpp
index 1b4ca2c86..4381cd387 100644
--- a/installerbuilder/libinstaller/environmentvariablesoperation.cpp
+++ b/installerbuilder/libinstaller/environmentvariablesoperation.cpp
@@ -172,8 +172,8 @@ bool EnvironmentVariableOperation::performOperation()
#endif
Q_ASSERT( !isPersistent );
- setValue( QLatin1String( "oldvalue" ), Environment::instance()->value( name ) );
- Environment::instance()->setTemporaryValue( name, value );
+ setValue( QLatin1String( "oldvalue" ), Environment::instance().value( name ) );
+ Environment::instance().setTemporaryValue( name, value );
return true;
}
@@ -194,10 +194,10 @@ bool EnvironmentVariableOperation::undoOperation()
#endif
if ( !isPersistent ) {
- const QString actual = Environment::instance()->value( name );
+ const QString actual = Environment::instance().value( name );
const bool doUndo = actual == value;
if ( doUndo )
- Environment::instance()->setTemporaryValue( name, oldvalue );
+ Environment::instance().setTemporaryValue( name, oldvalue );
return doUndo;
}