all repos — mgba @ 88983da5c4b8e979bab1820f0663abbd763611da

mGBA Game Boy Advance Emulator

Qt: Fix library crash when another instance is open...again
Vicki Pfau vi@endrift.com
Wed, 28 Jun 2017 12:02:09 -0700
commit

88983da5c4b8e979bab1820f0663abbd763611da

parent

bea917f868c52be398e312ae8b13638b5910553a

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/library/LibraryController.cppsrc/platform/qt/library/LibraryController.cpp

@@ -45,8 +45,10 @@ {

mLibraryListingInit(&m_listing, 0); if (!path.isNull()) { + // This can return NULL if the library is already open m_library = mLibraryLoad(path.toUtf8().constData()); - } else { + } + if (!m_library) { m_library = mLibraryCreateEmpty(); }