Qt: Fix crash when clicking past last tile in viewer
This commit is contained in:
parent
672867f1f6
commit
5b7780620d
1
CHANGES
1
CHANGES
@ -43,6 +43,7 @@ Other fixes:
|
|||||||
- GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396)
|
- GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396)
|
||||||
- mGUI: Fix FPS counter after closing menu
|
- mGUI: Fix FPS counter after closing menu
|
||||||
- Qt: Fix some hangs when using the debugger console
|
- Qt: Fix some hangs when using the debugger console
|
||||||
|
- Qt: Fix crash when clicking past last tile in viewer
|
||||||
- VFS: Failed file mapping should return NULL on POSIX
|
- VFS: Failed file mapping should return NULL on POSIX
|
||||||
Misc:
|
Misc:
|
||||||
- Core: Suspend runloop when a core crashes
|
- Core: Suspend runloop when a core crashes
|
||||||
|
@ -41,7 +41,10 @@ void TilePainter::resizeEvent(QResizeEvent*) {
|
|||||||
void TilePainter::mousePressEvent(QMouseEvent* event) {
|
void TilePainter::mousePressEvent(QMouseEvent* event) {
|
||||||
int x = event->x() / m_size;
|
int x = event->x() / m_size;
|
||||||
int y = event->y() / m_size;
|
int y = event->y() / m_size;
|
||||||
emit indexPressed(y * (width() / m_size) + x);
|
int index = y * (width() / m_size) + x;
|
||||||
|
if (index < m_tileCount) {
|
||||||
|
emit indexPressed(index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TilePainter::clearTile(int index) {
|
void TilePainter::clearTile(int index) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user