Commit 0f2f62b8 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

flatpak: Don't reuse GError instances

It might already be filled and that makes libostree to assert out when
it's the case.

BUG: 426565


(cherry picked from commit 97b1a453)
parent 2836f637
......@@ -225,7 +225,8 @@ bool FlatpakSourcesBackend::removeSource(const QString &id)
qWarning() << "could not list refs in repo" << id << error->message;
}
if (flatpak_installation_remove_remote(installation, id.toUtf8().constData(), cancellable, &error)) {
g_autoptr(GError) errorRemoveRemote = nullptr;
if (flatpak_installation_remove_remote(installation, id.toUtf8().constData(), cancellable, &errorRemoveRemote)) {
m_sources->removeRow(sourceItem->row());
if (m_sources->rowCount() == 0) {
......@@ -233,7 +234,7 @@ bool FlatpakSourcesBackend::removeSource(const QString &id)
}
return true;
} else {
Q_EMIT passiveMessage(i18n("Failed to remove %1 remote repository: %2", id, QString::fromUtf8(error->message)));
Q_EMIT passiveMessage(i18n("Failed to remove %1 remote repository: %2", id, QString::fromUtf8(errorRemoveRemote->message)));
return false;
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment