Fixing my silly mistake before someone else catches it.
authorsung <sung@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 30 Jan 2012 11:21:38 +0000 (11:21 +0000)
committersung <sung@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 30 Jan 2012 11:21:38 +0000 (11:21 +0000)
I was accessing a variable before it was NULL checked.
Fixed now.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@67601 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/engines/gl_x11/evas_engine.c

index 589b242..5edbb19 100644 (file)
@@ -3286,16 +3286,6 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context)
    sfc = (Render_Engine_GL_Surface*)surface;
    ctx = (Render_Engine_GL_Context*)context;
 
-   // Check if direct rendering is possible:
-   //    It's possible when direct_fb_opt is on and either current image 
-   //    object is valid or gl_direct_override is on.  Override allows 
-   //    rendering outside of pixel getter but it doesn't guarantee 
-   //    correct rendering.
-   if ((sfc->direct_fb_opt) && (gl_direct_img_obj || gl_direct_override))
-      gl_direct_enabled = 1;
-   else
-      gl_direct_enabled = 0;
-
    // Unset surface/context
    if ((!sfc) || (!ctx))
      {
@@ -3317,6 +3307,16 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context)
         return 1;
      }
 
+   // Check if direct rendering is possible:
+   //    It's possible when direct_fb_opt is on and either current image 
+   //    object is valid or gl_direct_override is on.  Override allows 
+   //    rendering outside of pixel getter but it doesn't guarantee 
+   //    correct rendering.
+   if ((sfc->direct_fb_opt) && (gl_direct_img_obj || gl_direct_override))
+      gl_direct_enabled = 1;
+   else
+      gl_direct_enabled = 0;
+
    if (gl_direct_enabled)
      {
         // Do a make current only if it's not already current