Skip to content

Commit

Permalink
Merge pull request #21 from jaysoffian/handle-nsexception-with-nil-re…
Browse files Browse the repository at this point in the history
…ason

Handle NSException with nil reason
  • Loading branch information
MatkovIvan committed Dec 11, 2019
2 parents 372142e + fd59fc8 commit 99baa22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/PLCrashLogWriter.m
Expand Up @@ -476,7 +476,7 @@ void plcrash_log_writer_set_exception (plcrash_log_writer_t *writer, NSException
/* Save the exception data */
writer->uncaught_exception.has_exception = true;
writer->uncaught_exception.name = strdup([[exception name] UTF8String]);
writer->uncaught_exception.reason = strdup([[exception reason] UTF8String]);
writer->uncaught_exception.reason = strdup([exception reason] != nil ? [[exception reason] UTF8String] : "");

/* Save the call stack, if available */
NSArray *callStackArray = [exception callStackReturnAddresses];
Expand Down

0 comments on commit 99baa22

Please sign in to comment.