Fix crash when closing dialog
This commit is contained in:
parent
188007ceb3
commit
4b23fe16d1
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ struct DialogDemo: View {
|
||||
.topToolbar {
|
||||
HeaderBar.empty()
|
||||
}
|
||||
Button("Close") { dialog = false }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user