Skip to content

Commit

Permalink
Fixed potential null pointer in error handler.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
  • Loading branch information
itdelatrisu committed Feb 3, 2017
1 parent 2f83f45 commit db376af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/itdelatrisu/opsu/ErrorHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public static String getEnvironmentInfoForIssue() {
*/
private static URI getIssueURI(String error, Throwable e, String trace) {
// generate report information
String issueTitle = (error != null) ? error : e.getMessage();
String issueTitle = (error != null) ? error : (e.getMessage() != null) ? e.getMessage() : "null";
StringBuilder sb = new StringBuilder();
sb.append(getEnvironmentInfoForIssue());
if (error != null) {
Expand Down

1 comment on commit db376af

@kouyang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lmao

Please sign in to comment.