@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2022 Jonathan Schleifer + * Copyright (c) 2008-2024 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -53,10 +53,14 @@ [super dealloc]; } - (OFString *)description { - return [OFString stringWithFormat: - @"Setting an option in an object of type %@ failed: %@", - [_object class], OFStrError(_errNo)]; + if (_object != nil) + return [OFString stringWithFormat: + @"Setting an option in an object of type %@ failed: %@", + [_object class], OFStrError(_errNo)]; + else + return [OFString stringWithFormat: + @"Setting an option failed: %@", OFStrError(_errNo)]; } @end