mirror of https://github.com/mgba-emu/mgba.git
Fix use after free with GBASIODeinit (#374)
This commit is contained in:
parent
7e9f43a9c9
commit
d7f09a330b
|
@ -123,7 +123,7 @@ void GBASIOSetDriver(struct GBASIO* sio, struct GBASIODriver* driver, enum GBASI
|
|||
}
|
||||
}
|
||||
}
|
||||
if (sio->mode == mode) {
|
||||
if (sio->activeDriver == *driverLoc) {
|
||||
sio->activeDriver = driver;
|
||||
if (driver && driver->load) {
|
||||
driver->load(driver);
|
||||
|
|
Loading…
Reference in New Issue