cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.7k stars 79 forks source link

fix examples/layout/layout.go app nil point and remove .idea #784

Closed ddkwork closed 8 months ago

ddkwork commented 8 months ago

fix examples/layout/layout.go app nil point remove .idea

GOROOT=C:\Users\Admin\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.21.5.windows-amd64 #gosetup
GOPATH=C:\Users\Admin\go #gosetup
C:\Users\Admin\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.21.5.windows-amd64\bin\go.exe build -o C:\Users\Admin\AppData\Local\JetBrains\GoLand2023.3\tmp\GoLand\___go_build_goki_dev_examples_layout.exe goki.dev/examples/layout #gosetup
C:\Users\Admin\AppData\Local\JetBrains\GoLand2023.3\tmp\GoLand\___go_build_goki_dev_examples_layout.exe
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x18 pc=0x7ff6abc23249]

goroutine 1 [running, locked to thread]:
main.main()
        C:/Users/Admin/Desktop/goki/examples/layout/layout.go:106 +0x69

Process finished with the exit code 2
kkoreilly commented 8 months ago

Thanks!