From e0469073ab9ed8f1b23fc6fc4981be5c2424d1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Thu, 2 Jan 2014 21:18:08 +0000 Subject: [PATCH] [GB.GSL] * BUG: Polynomial: Create a new void polymonial does lead to a crash anymore. git-svn-id: svn://localhost/gambas/trunk@6055 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.gsl/src/c_polynomial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gb.gsl/src/c_polynomial.c b/gb.gsl/src/c_polynomial.c index 6df47852a..cf64908de 100644 --- a/gb.gsl/src/c_polynomial.c +++ b/gb.gsl/src/c_polynomial.c @@ -598,8 +598,7 @@ BEGIN_METHOD(Polynomial_new, GB_INTEGER size; GB_BOOLEAN complex) bool complex = VARGOPT(complex, FALSE); int size = VARGOPT(size, 0); - if (size > 0) - GB.NewArray(POINTER(&THIS->data), complex ? sizeof(gsl_complex) : sizeof(double), size); + GB.NewArray(POINTER(&THIS->data), complex ? sizeof(gsl_complex) : sizeof(double), size); THIS->size = size; THIS->complex = complex;