Index: src/exceptions/OFException.m ================================================================== --- src/exceptions/OFException.m +++ src/exceptions/OFException.m @@ -142,21 +142,26 @@ for (i = 0; i < OF_BACKTRACE_SIZE && _backtrace[i] != NULL; i++) { # ifdef HAVE_DLADDR Dl_info info; if (dladdr(_backtrace[i], &info)) { - ptrdiff_t offset = (char*)_backtrace[i] - - (char*)info.dli_saddr; - - if (info.dli_sname == NULL) - info.dli_sname = "??"; - - [backtrace addObject: - [OFString stringWithFormat: @"%p <%s+%td> at %s", - _backtrace[i], - info.dli_sname, offset, - info.dli_fname]]; + OFString *frame; + + if (info.dli_sname != NULL) { + ptrdiff_t offset = (char*)_backtrace[i] - + (char*)info.dli_saddr; + + frame = [OFString stringWithFormat: + @"%p <%s+%td> at %s", + _backtrace[i], info.dli_sname, offset, + info.dli_fname]; + } else + frame = [OFString stringWithFormat: + @"%p at %s", + _backtrace[i], info.dli_fname]; + + [backtrace addObject: frame]; } else # endif [backtrace addObject: [OFString stringWithFormat: @"%p", _backtrace[i]]]; }