Permalink
Browse files

Fix null pointer when logging before user info available

Change-Id: Ie39c3a9e0e35c58a97a9307db8cd31a086e602b5
  • Loading branch information...
ewpatton authored and jisqyv committed Dec 3, 2018
1 parent 3e53333 commit b99cfc47eea0d514da2340c99f2a8fa84d6cf863
Showing with 3 additions and 2 deletions.
  1. +3 −2 appinventor/appengine/src/com/google/appinventor/client/output/OdeLog.java
@@ -1,6 +1,6 @@
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Copyright 2011-2018 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0

@@ -83,7 +83,8 @@ public void onClick(ClickEvent event) {
* @return logging availability
*/
public static final boolean isLogAvailable() {
return AppInventorFeatures.hasDebuggingView() && Ode.getInstance().getUser().getIsAdmin();
return AppInventorFeatures.hasDebuggingView() &&
(Ode.getInstance().getUser() == null || Ode.getInstance().getUser().getIsAdmin());
}

/**

0 comments on commit b99cfc4

Please sign in to comment.