We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3974526 + 0456e1f commit 22a91c1Copy full SHA for 22a91c1
gdk-pixbuf/src/subclass/pixbuf_animation.rs
@@ -137,12 +137,20 @@ unsafe extern "C" fn animation_get_size<T: PixbufAnimationImpl>(
137
width_ptr: *mut libc::c_int,
138
height_ptr: *mut libc::c_int,
139
) {
140
+ if width_ptr.is_null() && height_ptr.is_null() {
141
+ return;
142
+ }
143
+
144
let instance = &*(ptr as *mut T::Instance);
145
let imp = instance.imp();
146
147
let (width, height) = imp.size();
- *width_ptr = width;
- *height_ptr = height;
148
+ if !width_ptr.is_null() {
149
+ *width_ptr = width;
150
151
+ if !height_ptr.is_null() {
152
+ *height_ptr = height;
153
154
}
155
156
unsafe extern "C" fn animation_get_static_image<T: PixbufAnimationImpl>(
0 commit comments