Skip to content

Commit 6999a11

Browse files
authored
Handle invalid Crashpad handler path (#97)
* Hanle invalid Crashpad handler path * Use helper instead of File + fix typo
1 parent 149cc4a commit 6999a11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backtrace-library/src/main/java/backtraceio/library/BacktraceDatabase.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,11 @@ public Boolean setupNativeIntegration(BacktraceBase client, BacktraceCredentials
177177
}
178178
// Path to Crashpad native handler
179179
String handlerPath = _applicationContext.getApplicationInfo().nativeLibraryDir + _crashpadHandlerName;
180+
if (!FileHelper.isFileExists(handlerPath)) {
181+
return false;
182+
}
180183

181-
// setup default native attribtues
184+
// setup default native attributes
182185
BacktraceAttributes crashpadAttributes = new BacktraceAttributes(_applicationContext, client.attributes);
183186
crashpadAttributes.attributes.put(BacktraceAttributeConsts.ErrorType, BacktraceAttributeConsts.CrashAttributeType);
184187
String[] keys = crashpadAttributes.attributes.keySet().toArray(new String[0]);

0 commit comments

Comments
 (0)