summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/qstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp
index 808a0bea5..927669c61 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -1513,7 +1513,7 @@ TQString::TQString( TQChar ch )
TQString::TQString( const TQString &s ) :
d(s.d)
{
- if (d != shared_null) {
+ if ( d && (d != shared_null) ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE)
d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE
@@ -1765,7 +1765,7 @@ void TQStringData::deleteSelf()
*/
TQString &TQString::operator=( const TQString &s )
{
- if (s.d != shared_null) {
+ if ( s.d && (s.d != shared_null) ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE)
s.d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE