File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ Error ImageItem_iden::get_coded_image_colorspace(heif_colorspace* out_colorspace
90
90
}
91
91
92
92
auto image = get_context ()->get_image (child, true );
93
+ if (!image) {
94
+ return Error{heif_error_Invalid_input,
95
+ heif_suberror_Nonexisting_item_referenced};
96
+ }
97
+
93
98
return image->get_coded_image_colorspace (out_colorspace, out_chroma);
94
99
}
95
100
@@ -103,6 +108,10 @@ int ImageItem_iden::get_luma_bits_per_pixel() const
103
108
}
104
109
105
110
auto image = get_context ()->get_image (child, true );
111
+ if (!image) {
112
+ return -1 ;
113
+ }
114
+
106
115
return image->get_luma_bits_per_pixel ();
107
116
}
108
117
@@ -116,5 +125,9 @@ int ImageItem_iden::get_chroma_bits_per_pixel() const
116
125
}
117
126
118
127
auto image = get_context ()->get_image (child, true );
128
+ if (!image) {
129
+ return -1 ;
130
+ }
131
+
119
132
return image->get_chroma_bits_per_pixel ();
120
133
}
You can’t perform that action at this time.
0 commit comments