NLA SoC: Merge from 2.5
[blender.git] / source / blender / editors / space_file / filesel.c
index d57fc7f90bc4ef7c73bdd146f195a0dac3831c25..4c2def72de06530e07e7f419befa1775e85f7133 100644 (file)
@@ -131,6 +131,9 @@ int ED_fileselect_layout_offset(FileLayout* layout, int x, int y)
        int offsetx, offsety;
        int active_file;
 
+       if (layout == NULL)
+               return NULL;
+       
        offsetx = (x)/(layout->tile_w + 2*layout->tile_border_x);
        offsety = (y)/(layout->tile_h + 2*layout->tile_border_y);