diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-09-11 10:51:13 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-09-11 11:30:36 +0200 |
commit | 7f2e3fc296ec74518f65b61c6ea196eb177169a4 (patch) | |
tree | 6ad3e4bd29b3f677c73043342b5379bfbd2e2519 /src/plugins/coreplugin | |
parent | de69b82c855557099d2dfc921ed52e5465e0388a (diff) | |
download | qt-creator-7f2e3fc296ec74518f65b61c6ea196eb177169a4.tar.gz |
Editors: change QTC_CHECK to Q_ASSERT to prevent nullptr derefs.
When the check would fail, it would result in an nullptr deref 4 lines
down. As this is a constructor, doing a QTC_ASSERT(..., return) would
leave the object partially initialized, with some fields containing
random garbage.
Change-Id: I7e504f16f3bd07e3669c02773434915bc817c8bd
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/coreplugin')
-rw-r--r-- | src/plugins/coreplugin/editormanager/editorview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index a9252e604d..585baa0aa6 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -556,7 +556,7 @@ SplitterOrView::SplitterOrView(Core::IEditor *editor) SplitterOrView::SplitterOrView(EditorView *view) { - QTC_CHECK(view); + Q_ASSERT(view); m_layout = new QStackedLayout(this); m_layout->setSizeConstraint(QLayout::SetNoConstraint); m_view = view; |