Fix qt warning

Try to call deleteLater on a nullptr would cause qt print warning message: "QCoreApplication::notify: Unexpected null receiver"
master
Jeremy Hu 2018-10-24 06:51:33 +08:00
parent d663876c5c
commit f2849a020f
1 changed files with 2 additions and 1 deletions

View File

@ -47,6 +47,7 @@ void MotionClipWidget::setClip(SkeletonMotionClip clip)
void MotionClipWidget::reload()
{
if (nullptr != m_reloadToWidget)
m_reloadToWidget->deleteLater();
m_reloadToWidget = new QWidget(this);
m_reloadToWidget->setContentsMargins(1, 0, 0, 0);