summaryrefslogtreecommitdiff
path: root/recipes/nunome/files/timer.patch
blob: ccd65647be53282845db4936ad0951f0c4c8088d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/ui/nnmCanvas.cpp b/ui/nnmCanvas.cpp
index a548ddf..3b8e7d4 100755
--- a/ui/nnmCanvas.cpp
+++ b/ui/nnmCanvas.cpp
@@ -35,7 +35,7 @@
 
 nnmCanvas::nnmCanvas( QWidget *parent, int timeoutParam, int initID,
 		      const char *name, WFlags f )
-			: QWidget( parent, name, f )
+			: QWidget( parent, name, f ), timer(0)
 {
 	setFixedSize( NnmCANVAS_DISPLAY_SIZE, NnmCANVAS_DISPLAY_SIZE );
 	init();
@@ -149,7 +149,7 @@ void	nnmCanvas::resizeEvent( QResizeEvent *event )
 
 void	nnmCanvas::init( void )
 {
-	if ( timeoutMsec > 0  &&  timer->isActive() )	{
+	if ( timeoutMsec > 0  &&  timer && timer->isActive() )	{
 		timer->stop();
 	}