Add an assert simplifying debugging.
Statics should not be deleted, the assert shows a nicer debug information then a segmentation fault. Change-Id: I9eedbfa966d7865fd7bb1e130c79e40bae3526cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
55024ee0f9
commit
c68d8ca76c
@ -112,6 +112,7 @@ void QArrayData::deallocate(QArrayData *data, size_t objectSize,
|
||||
if (data == &qt_array_unsharable_empty)
|
||||
return;
|
||||
|
||||
Q_ASSERT_X(!data->ref.isStatic(), "QArrayData::deallocate", "Static data can not be deleted");
|
||||
::free(data);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user