gsk: Fix texture slicing
authorMatthias Clasen <mclasen@redhat.com>
Wed, 15 Mar 2023 19:45:01 +0000 (15:45 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 15 Mar 2023 19:45:01 +0000 (15:45 -0400)
We were just returning NULL for slices
here, which wasn't the intention.

gsk/gl/gskgldriverprivate.h

index 2b39217919149a583bc9b565bddda185d46eb88f..e1f30c2d2df0b1d8f9e8d5b40abd4e05a573654e 100644 (file)
@@ -243,7 +243,7 @@ gsk_gl_driver_slice_texture (GskGLDriver        *self,
 
   if ((t = gdk_texture_get_render_data (texture, self)))
     {
-      if (min_cols == 0 && min_rows == 0)
+      if (min_cols == 0 && min_rows == 0 && t->slices)
         {
           *out_slices = t->slices;
           *out_n_slices = t->n_slices;