diff options
-rw-r--r-- | src/corelib/tools/qarraydata.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp index 98c484c1dd..b6f4b3202b 100644 --- a/src/corelib/tools/qarraydata.cpp +++ b/src/corelib/tools/qarraydata.cpp @@ -118,7 +118,8 @@ void QArrayData::deallocate(QArrayData *data, size_t objectSize, return; #endif - Q_ASSERT_X(!data->ref.isStatic(), "QArrayData::deallocate", "Static data can not be deleted"); + Q_ASSERT_X(data == 0 || !data->ref.isStatic(), "QArrayData::deallocate", + "Static data can not be deleted"); ::free(data); } |