From 9706085f73bf9510493a5ee82e05a9c08ce677cc Mon Sep 17 00:00:00 2001 From: Mohammed Sameer Date: Sat, 6 Apr 2013 21:02:26 +0300 Subject: [PATCH] Use a QPointer for the m_mode member. m_mode is owned by the device and it will be destroyed if device gets destroyed. --- declarative/mode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/declarative/mode.h b/declarative/mode.h index f92869b..f8fb30b 100644 --- a/declarative/mode.h +++ b/declarative/mode.h @@ -24,6 +24,7 @@ #define MODE_H #include +#include class Camera; class QImage; @@ -68,7 +69,7 @@ protected: virtual void changeMode() = 0; Camera *m_cam; - QtCamMode *m_mode; + QPointer m_mode; private: unsigned long long m_seq; -- 2.25.1