From 36676009b26d594d904528afb0274f90835b1288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ty=C3=A1s=20Mustoha?= Date: Mon, 16 Mar 2015 18:05:15 +0100 Subject: [PATCH] Fixed crash on empty gradient stops vector. --- src/azure_hl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure_hl.rs b/src/azure_hl.rs index 11fae3e..e36d19c 100644 --- a/src/azure_hl.rs +++ b/src/azure_hl.rs @@ -674,7 +674,7 @@ impl DrawTarget { unsafe { GradientStops::new(AzDrawTargetCreateGradientStops( self.azure_draw_target, - mem::transmute::<_,*const AzGradientStop>(&gradient_stops[0]), + mem::transmute::<_,*const AzGradientStop>(gradient_stops.as_ptr()), gradient_stops.len() as u32, extend_mode.as_azure_extend_mode())) }