forked from aparoksha/adwaita-swift
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 {
|
if storage.content[dialogID + id]?.first != nil {
|
||||||
let dialog = storage.content[dialogID + id]?.first?.opaquePointer
|
let dialog = storage.content[dialogID + id]?.first?.opaquePointer
|
||||||
adw_dialog_close(dialog?.cast())
|
adw_dialog_close(dialog?.cast())
|
||||||
g_object_unref(dialog?.cast())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,7 @@ struct DialogDemo: View {
|
|||||||
.topToolbar {
|
.topToolbar {
|
||||||
HeaderBar.empty()
|
HeaderBar.empty()
|
||||||
}
|
}
|
||||||
|
Button("Close") { dialog = false }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user