Fix crash if widgets are deleted before new ones are set

This commit is contained in:
Aurélien Gâteau 2014-08-07 12:58:28 +02:00
parent 55f4231c92
commit c109059eb7

View File

@ -20,6 +20,7 @@
#define PARTITIONSIZECONTROLLER_H #define PARTITIONSIZECONTROLLER_H
#include <QObject> #include <QObject>
#include <QPointer>
class QSpinBox; class QSpinBox;
@ -40,8 +41,8 @@ public:
void init( Device* device, Partition* partition ); void init( Device* device, Partition* partition );
private: private:
PartResizerWidget* m_partResizerWidget = nullptr; QPointer< PartResizerWidget > m_partResizerWidget;
QSpinBox* m_spinBox = nullptr; QPointer< QSpinBox > m_spinBox;
Device* m_device = nullptr; Device* m_device = nullptr;
Partition* m_partition = nullptr; Partition* m_partition = nullptr;
bool m_updating = false; bool m_updating = false;