Skip to content

Commit 923901a

Browse files
authored
Fix build errors and a crash in xcode 15 (#2093)
* Fix build errors and a crash in xcode 15 * early return if 0 or negative dimensions found
1 parent 28e3bae commit 923901a

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- iOSSnapshotTestCase/Core (6.2.0)
3-
- OCMock (3.6)
3+
- OCMock (3.9.1)
44

55
DEPENDENCIES:
66
- iOSSnapshotTestCase/Core (~> 6.2)
@@ -13,8 +13,8 @@ SPEC REPOS:
1313

1414
SPEC CHECKSUMS:
1515
iOSSnapshotTestCase: 9ab44cb5aa62b84d31847f40680112e15ec579a6
16-
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992
16+
OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8
1717

18-
PODFILE CHECKSUM: 1b4ea0e8ab7d94a46b1964a2354686c2e599c8c2
18+
PODFILE CHECKSUM: 0a3b63450c1b52ec105545b62c41089097e077d6
1919

20-
COCOAPODS: 1.10.0
20+
COCOAPODS: 1.12.1

Source/Details/ASGraphicsContext.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ NS_INLINE void ASConfigureExtendedRange(UIGraphicsImageRendererFormat *format)
4747
}
4848

4949
UIImage *ASGraphicsCreateImage(ASPrimitiveTraitCollection traitCollection, CGSize size, BOOL opaque, CGFloat scale, UIImage * sourceImage, asdisplaynode_iscancelled_block_t NS_NOESCAPE isCancelled, void (NS_NOESCAPE ^work)()) {
50+
if (size.width <= 0 || size.height <= 0) {
51+
return nil;
52+
}
53+
5054
if (AS_AVAILABLE_IOS_TVOS(10, 10)) {
5155
if (ASActivateExperimentalFeature(ASExperimentalDrawingGlobal)) {
5256
// If they used default scale, reuse one of two preferred formats.

Source/Details/ASThread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#import <AsyncDisplayKit/ASObjectDescriptionHelpers.h>
2121
#import <AsyncDisplayKit/ASRecursiveUnfairLock.h>
2222

23-
ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT BOOL ASDisplayNodeThreadIsMain()
23+
ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT BOOL ASDisplayNodeThreadIsMain(void)
2424
{
2525
return 0 != pthread_main_np();
2626
}

Source/Layout/ASDimensionInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef struct {
3838
/**
3939
* Returns an ASLayoutElementSize with default values.
4040
*/
41-
ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT ASLayoutElementSize ASLayoutElementSizeMake()
41+
ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT ASLayoutElementSize ASLayoutElementSizeMake(void)
4242
{
4343
return (ASLayoutElementSize){
4444
.width = ASDimensionAuto,

0 commit comments

Comments
 (0)