Fix crash when closing dialog
All checks were successful
Deploy Docs / publish (push) Successful in 20m30s
SwiftLint / SwiftLint (push) Successful in 6s

This commit is contained in:
david-swift 2024-11-11 21:52:26 +01:00
parent 188007ceb3
commit 4b23fe16d1
2 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,6 @@ public struct Dialog: AdwaitaWidget {
if storage.content[dialogID + id]?.first != nil {
let dialog = storage.content[dialogID + id]?.first?.opaquePointer
adw_dialog_close(dialog?.cast())
g_object_unref(dialog?.cast())
}
}
}

View File

@ -32,6 +32,7 @@ struct DialogDemo: View {
.topToolbar {
HeaderBar.empty()
}
Button("Close") { dialog = false }
}
}