mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-05 05:21:03 +08:00
[v3 windows] Fix missing panic stacktraces during message loop
This commit is contained in:
parent
5e76a5e76a
commit
842bc3733e
@ -3,10 +3,11 @@
|
|||||||
package application
|
package application
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/wailsapp/wails/v3/pkg/w32"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"github.com/wailsapp/wails/v3/pkg/w32"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -56,7 +57,7 @@ func (m *windowsApp) runMainLoop() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg := (*w32.MSG)(unsafe.Pointer(w32.GlobalAlloc(0, uint32(unsafe.Sizeof(w32.MSG{})))))
|
msg := (*w32.MSG)(unsafe.Pointer(w32.GlobalAlloc(0, uint32(unsafe.Sizeof(w32.MSG{})))))
|
||||||
defer w32.GlobalFree(w32.HGLOBAL(unsafe.Pointer(m)))
|
defer w32.GlobalFree(w32.HGLOBAL(unsafe.Pointer(msg)))
|
||||||
|
|
||||||
for w32.GetMessage(msg, 0, 0, 0) != 0 {
|
for w32.GetMessage(msg, 0, 0, 0) != 0 {
|
||||||
w32.TranslateMessage(msg)
|
w32.TranslateMessage(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user