0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 00:31:02 +08:00

(profiler gui) fix potencial zero pointer

This commit is contained in:
Sergey Yagovtsev 2016-08-19 00:35:20 +03:00
parent 7a87d681a1
commit 485c2a64ac

View File

@ -1441,6 +1441,12 @@ void EasyGraphicsView::setScrollbar(EasyGraphicsScrollbar* _scrollbar)
disconnect(m_pScrollbar, &EasyGraphicsScrollbar::valueChanged, this, &This::onGraphicsScrollbarValueChange);
}
if(!_scrollbar)
{
qWarning() << "Zero pointer in EasyGraphicsView::setScrollbar(EasyGraphicsScrollbar*): " << __LINE__ << " in file " << __FILE__;
return;
}
m_pScrollbar = _scrollbar;
m_pScrollbar->setMinimapFrom(0, nullptr);
m_pScrollbar->hideChrono();