From 24ba6318645417a6c8ef2637a3984a4310c8fcde Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 8 Jan 2019 19:22:47 -0800 Subject: [PATCH] handle platform init error --- tools/viewer/viewer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/viewer/viewer.go b/tools/viewer/viewer.go index 16297fb..1f613d1 100644 --- a/tools/viewer/viewer.go +++ b/tools/viewer/viewer.go @@ -139,7 +139,10 @@ func main() { os.Exit(2) } - platform.Initialize() + if err := platform.Initialize(); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } defer platform.Shutdown() animation, err := loadAnimation(flag.Arg(0))