From c225cde5697a8a1fc7e7e776b5d62f81a0b34feb Mon Sep 17 00:00:00 2001
From: Per Hedbor <ph@opera.com>
Date: Mon, 1 Sep 1997 16:17:11 +0200
Subject: [PATCH] Moved all error()s outside THREAD_ALLOW()... (or, rather, the
 other way around, moved THREAD_ALLOW to after the checks.

Rev: src/modules/Image/matrix.c:1.8
---
 src/modules/Image/matrix.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modules/Image/matrix.c b/src/modules/Image/matrix.c
index 5968e2af60..89e1ee6d71 100644
--- a/src/modules/Image/matrix.c
+++ b/src/modules/Image/matrix.c
@@ -1,9 +1,9 @@
-/* $Id: matrix.c,v 1.7 1997/05/29 22:45:07 mirar Exp $ */
+/* $Id: matrix.c,v 1.8 1997/09/01 14:17:11 per Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: matrix.c,v 1.7 1997/05/29 22:45:07 mirar Exp $<br>
+**!	$Id: matrix.c,v 1.8 1997/09/01 14:17:11 per Exp $<br>
 **! class image
 */
 
@@ -169,9 +169,9 @@ CHRONO("scale begin");
 
    if (!THIS->img || newx<=0 || newy<=0) return; /* no way */
 
-   THREADS_ALLOW();
    new=malloc(newx*newy*sizeof(rgbd_group) +1);
    if (!new) error("Out of memory!\n");
+   THREADS_ALLOW();
 
    for (y=0; y<newx*newy; y++)
       new[y].r=new[y].g=new[y].b=0.0;
@@ -234,9 +234,9 @@ void img_scale2(struct image *dest, struct image *source)
    if (dest->img) { free(dest->img); dest->img=NULL; }
    if (!THIS->img || newx<=0 || newy<=0) return; /* no way */
 
-   THREADS_ALLOW();
    new=malloc(newx*newy*sizeof(rgb_group) +1);
    if (!new) error("Out of memory\n");
+   THREADS_ALLOW();
    MEMSET(new,0,newx*newy*sizeof(rgb_group));
 
    dest->img=new;
-- 
GitLab