projects
/
profile
/
ivi
/
qtbase.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55024ee
)
Add an assert simplifying debugging.
author
Jędrzej Nowacki
<jedrzej.nowacki@nokia.com>
Thu, 26 Apr 2012 10:03:29 +0000
(12:03 +0200)
committer
Qt by Nokia
<qt-info@nokia.com>
Fri, 4 May 2012 13:24:52 +0000
(15:24 +0200)
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>
src/corelib/tools/qarraydata.cpp
patch
|
blob
|
history
diff --git
a/src/corelib/tools/qarraydata.cpp
b/src/corelib/tools/qarraydata.cpp
index
328d39c
..
42b5741
100644
(file)
--- a/
src/corelib/tools/qarraydata.cpp
+++ b/
src/corelib/tools/qarraydata.cpp
@@
-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);
}