mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
fixed segmentation fault when speed/volume sliders are clicked and then dragged out of the scummvm window.
svn-id: r19683
This commit is contained in:
parent
9a09283a76
commit
619f0fa5a0
@ -332,7 +332,8 @@ void Control::buttonControl(ConResource *pButton) {
|
||||
return;
|
||||
}
|
||||
if (_curButtonText != pButton->_text) {
|
||||
if (_textSprite) free(_textSprite);
|
||||
if (_textSprite)
|
||||
free(_textSprite);
|
||||
_textSprite = NULL;
|
||||
_curButtonText = pButton->_text;
|
||||
if (pButton->_text) {
|
||||
@ -345,9 +346,11 @@ void Control::buttonControl(ConResource *pButton) {
|
||||
}
|
||||
_textSprite = (dataFileHeader *)textRes.textData;
|
||||
_text->setSprite(_textSprite);
|
||||
} else _text->setSprite(NULL);
|
||||
} else
|
||||
_text->setSprite(NULL);
|
||||
}
|
||||
_text->setXY(_mouseX + 12, _mouseY - 16);
|
||||
int destY = (_mouseY - 16 >= 0) ? _mouseY - 16 : 0;
|
||||
_text->setXY(_mouseX + 12, destY);
|
||||
}
|
||||
|
||||
void Control::drawTextCross(uint32 flags) {
|
||||
|
Loading…
Reference in New Issue
Block a user