Tuesday merger of bf-blender into orange branch.
[blender-staging.git] / source / blender / src / header_image.c
index 38e8938b052f8e322d1a6aee4512beab73abe502..0a4a8391b20ab86422fc4d5290373ac36c861a7c 100644 (file)
@@ -177,7 +177,6 @@ static void save_paint(char *name)
 {
        char str[FILE_MAXDIR+FILE_MAXFILE];
        Image *ima = G.sima->image;
-       ImBuf *ibuf;
 
        if (ima  && ima->ibuf) {
                BLI_strncpy(str, name, sizeof(str));
@@ -185,7 +184,7 @@ static void save_paint(char *name)
                BLI_convertstringcode(str, G.sce, G.scene->r.cfra);
 
                if (saveover(str)) {
-                       if (BIF_write_ibuf(ibuf, str)) {
+                       if (BIF_write_ibuf(ima->ibuf, str)) {
                                BLI_strncpy(ima->name, name, sizeof(ima->name));
                                ima->ibuf->userflags &= ~IB_BITMAPDIRTY;
                                allqueue(REDRAWHEADERS, 0);