Fix #19980: crash with opengl render active viewport.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 30 Jan 2010 09:53:55 +0000 (09:53 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 30 Jan 2010 09:53:55 +0000 (09:53 +0000)
source/blender/editors/screen/screen_ops.c
source/blender/gpu/intern/gpu_extensions.c

index 5c66c9a32e06fd29457e3a139d6ee51e77979216..209535b1350d67052ef126637bb571ed98efc378 100644 (file)
@@ -3397,7 +3397,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
        
        rr= RE_AcquireResultWrite(oglrender->re);
        if(rr->rectf==NULL)
-               rr->rectf= MEM_mallocN(sizeof(float)*4*sizex*sizex, "32 bits rects");
+               rr->rectf= MEM_mallocN(sizeof(float)*4*sizex*sizey, "32 bits rects");
        RE_ReleaseResult(oglrender->re);
        
        return 1;
index 48ef5fdb0aaa4f1e848d7b482b54072995931556..a5a8c626cbdae9500fb479ca02aa20559ed8a1a4 100644 (file)
@@ -103,7 +103,7 @@ int GPU_non_power_of_two_support()
        /* Exception for buggy ATI/Apple driver in Mac OS X 10.5/10.6,
         * they claim to support this but can cause system freeze */
 #ifdef __APPLE__
-       if(strcmp(glGetString(GL_VENDOR), "ATI Technologies Inc.") == 0)
+       if(strcmp((char*)glGetString(GL_VENDOR), "ATI Technologies Inc.") == 0)
                return 0;
 #endif