Fix nil pointer dereference when sensor is not connected/initialized and webUI sensor option is disabled.
Fix nil pointer dereference when sensor is not connected/initialized and webUI sensor option is disabled.

2017/03/28 13:43:00 wrote settings.
2017/03/28 13:43:01 http: panic serving 192.168.10.12:52012: runtime
error: invalid memory address or nil pointer dereference
goroutine 83 [running]:
net/http.(*conn).serve.func1(0x10ab6ae0, 0x73826140, 0x10d8c708)
	/root/go-1.5.1/src/net/http/server.go:1287 +0x9c
main.handleSettingsSetRequest(0x72ec00b0, 0x10d93580, 0x10db0620)
	/root/stratux-westphae/main/managementinterface.go:286 +0x1620
net/http.HandlerFunc.ServeHTTP(0x5d2ecc, 0x72ec00b0, 0x10d93580,
0x10db0620)
	/root/go-1.5.1/src/net/http/server.go:1422 +0x34
net/http.(*ServeMux).ServeHTTP(0x10960dc0, 0x72ec00b0, 0x10d93580,
0x10db0620)
	/root/go-1.5.1/src/net/http/server.go:1699 +0x164
net/http.serverHandler.ServeHTTP(0x109c4300, 0x72ec00b0, 0x10d93580,
0x10db0620)
	/root/go-1.5.1/src/net/http/server.go:1862 +0x190
net/http.(*conn).serve(0x10ab6ae0)
	/root/go-1.5.1/src/net/http/server.go:1361 +0xbfc
created by net/http.(*Server).Serve
	/root/go-1.5.1/src/net/http/server.go:1910 +0x360
2017/03/28 13:43:01 http: panic serving 192.168.10.12:52013: runtime
error: invalid memory address or nil pointer dereference
goroutine 58 [running]:
net/http.(*conn).serve.func1(0x1098b4a0, 0x73826140, 0x10de8228)
	/root/go-1.5.1/src/net/http/server.go:1287 +0x9c
main.handleSettingsSetRequest(0x72ec00b0, 0x10d93680, 0x10db0690)
	/root/stratux-westphae/main/managementinterface.go:286 +0x1620
net/http.HandlerFunc.ServeHTTP(0x5d2ecc, 0x72ec00b0, 0x10d93680,
0x10db0690)
	/root/go-1.5.1/src/net/http/server.go:1422 +0x34
net/http.(*ServeMux).ServeHTTP(0x10960dc0, 0x72ec00b0, 0x10d93680,
0x10db0690)
	/root/go-1.5.1/src/net/http/server.go:1699 +0x164
net/http.serverHandler.ServeHTTP(0x109c4300, 0x72ec00b0, 0x10d93680,
0x10db0690)
	/root/go-1.5.1/src/net/http/server.go:1862 +0x190
net/http.(*conn).serve(0x1098b4a0)
	/root/go-1.5.1/src/net/http/server.go:1361 +0xbfc
created by net/http.(*Server).Serve
	/root/go-1.5.1/src/net/http/server.go:1910 +0x360

cyoung/stratux,jpoirier/stratux,cyoung/stratux,westphae/stratux,cyoung/stratux,cyoung/stratux,jpoirier/stratux,cyoung/stratux,westphae/stratux,jpoirier/stratux,cyoung/stratux,jpoirier/stratux,westphae/stratux,westphae/stratux,jpoirier/stratux,jpoirier/stratux,westphae/stratux,westphae/stratux