mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
delete the private QLibrary data pointer if library is unloaded, swap it otherwise
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
46549a750b
commit
d577fe9817
1 changed files with 10 additions and 3 deletions
|
@ -537,9 +537,16 @@ void QLibrary::setFileName(const QString &fileName)
|
|||
if (qt_debug_component()) {
|
||||
qDebug() << "QLibrary: reusing library" << librarymatch;
|
||||
}
|
||||
delete d_ptr;
|
||||
d_ptr = loadedlibrary;
|
||||
loadedlibraries->removeAt(i);
|
||||
if (!d_ptr->pHnd) {
|
||||
delete d_ptr;
|
||||
d_ptr = loadedlibrary;
|
||||
loadedlibraries->removeAt(i);
|
||||
} else {
|
||||
QLibraryPrivate* x_ptr = d_ptr;
|
||||
d_ptr = loadedlibrary;
|
||||
loadedlibraries->removeAt(i);
|
||||
loadedlibraries->append(x_ptr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue