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:
Thiago Macieira 2013-11-30 09:18:01 -08:00 committed by Dirk Hohndel
parent 22e0323d6a
commit 58d37e0200
2 changed files with 4 additions and 2 deletions

View file

@ -63,7 +63,8 @@ void StarWidget::setCurrentStars(int value)
StarWidget::StarWidget(QWidget* parent, Qt::WindowFlags f):
QWidget(parent, f),
current(0)
current(0),
readOnly(false)
{
if (!activeStar) {
activeStar = new QPixmap();

View file

@ -30,10 +30,11 @@ protected:
private:
int current;
bool readOnly;
static QPixmap* activeStar;
static QPixmap* inactiveStar;
QPixmap grayImage(QPixmap *coloredImg);
bool readOnly;
};
#endif // STARWIDGET_H