mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix uninitialised variable read
Found by Dr. Memory, run by Lubomir: Error #48: UNINITIALIZED READ: reading register al # 0 StarWidget::mouseReleaseEvent() [qt-ui/starwidget.cpp:29] Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									22e0323d6a
								
							
						
					
					
						commit
						58d37e0200
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -63,7 +63,8 @@ void StarWidget::setCurrentStars(int value)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
StarWidget::StarWidget(QWidget* parent, Qt::WindowFlags f):
 | 
					StarWidget::StarWidget(QWidget* parent, Qt::WindowFlags f):
 | 
				
			||||||
	QWidget(parent, f),
 | 
						QWidget(parent, f),
 | 
				
			||||||
	current(0)
 | 
						current(0),
 | 
				
			||||||
 | 
						readOnly(false)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (!activeStar) {
 | 
						if (!activeStar) {
 | 
				
			||||||
		activeStar = new QPixmap();
 | 
							activeStar = new QPixmap();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,10 +30,11 @@ protected:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
	int current;
 | 
						int current;
 | 
				
			||||||
 | 
						bool readOnly;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	static QPixmap* activeStar;
 | 
						static QPixmap* activeStar;
 | 
				
			||||||
	static QPixmap* inactiveStar;
 | 
						static QPixmap* inactiveStar;
 | 
				
			||||||
	QPixmap grayImage(QPixmap *coloredImg);
 | 
						QPixmap grayImage(QPixmap *coloredImg);
 | 
				
			||||||
	bool readOnly;
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif // STARWIDGET_H
 | 
					#endif // STARWIDGET_H
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue