mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-06 06:19:52 +08:00
bug-fix: remove unnecessary NULL check before delete
This commit is contained in:
parent
8ff520d0fd
commit
6d24f7e92b
@ -54,10 +54,8 @@ VInsertImageDialog::VInsertImageDialog(const QString &p_title,
|
|||||||
|
|
||||||
VInsertImageDialog::~VInsertImageDialog()
|
VInsertImageDialog::~VInsertImageDialog()
|
||||||
{
|
{
|
||||||
if (m_image) {
|
delete m_image;
|
||||||
delete m_image;
|
m_image = NULL;
|
||||||
m_image = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VInsertImageDialog::setupUI(const QString &p_title,
|
void VInsertImageDialog::setupUI(const QString &p_title,
|
||||||
@ -152,10 +150,8 @@ void VInsertImageDialog::setImage(const QImage &image)
|
|||||||
{
|
{
|
||||||
if (image.isNull()) {
|
if (image.isNull()) {
|
||||||
imagePreviewLabel->setVisible(false);
|
imagePreviewLabel->setVisible(false);
|
||||||
if (m_image) {
|
delete m_image;
|
||||||
delete m_image;
|
m_image = NULL;
|
||||||
m_image = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
handleInputChanged();
|
handleInputChanged();
|
||||||
return;
|
return;
|
||||||
|
@ -36,9 +36,7 @@ VTextEdit::VTextEdit(const QString &p_text, QWidget *p_parent)
|
|||||||
|
|
||||||
VTextEdit::~VTextEdit()
|
VTextEdit::~VTextEdit()
|
||||||
{
|
{
|
||||||
if (m_imageMgr) {
|
delete m_imageMgr;
|
||||||
delete m_imageMgr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VTextEdit::init()
|
void VTextEdit::init()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user