Fix crash when loading 24-bit brushes
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2020 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
eb882524cd
commit
919357ab46
@ -3276,16 +3276,14 @@ void Load_picture(byte image)
|
|||||||
Compute_limits();
|
Compute_limits();
|
||||||
Compute_paintbrush_coordinates();
|
Compute_paintbrush_coordinates();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Compute_optimal_menu_colors(Main_palette);
|
Compute_optimal_menu_colors(Main_palette);
|
||||||
Redraw_layered_image();
|
Redraw_layered_image();
|
||||||
End_of_modification();
|
End_of_modification();
|
||||||
Check_menu_mode();
|
Check_menu_mode();
|
||||||
Display_all_screen();
|
Display_all_screen();
|
||||||
|
|
||||||
if (image)
|
|
||||||
Main_image_is_modified=0;
|
Main_image_is_modified=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Destroy_context(&context);
|
Destroy_context(&context);
|
||||||
|
|||||||
@ -685,7 +685,7 @@ void Load_image(T_IO_Context *context)
|
|||||||
Cursor_shape=CURSOR_SHAPE_HOURGLASS;
|
Cursor_shape=CURSOR_SHAPE_HOURGLASS;
|
||||||
Display_cursor();
|
Display_cursor();
|
||||||
Flush_update();
|
Flush_update();
|
||||||
if (Convert_24b_bitmap_to_256(Brush,context->Buffer_image_24b,context->Width,context->Height,context->Palette))
|
if (Convert_24b_bitmap_to_256(context->Buffer_image,context->Buffer_image_24b,context->Width,context->Height,context->Palette))
|
||||||
File_error=2;
|
File_error=2;
|
||||||
Hide_cursor();
|
Hide_cursor();
|
||||||
Cursor_shape=CURSOR_SHAPE_ARROW;
|
Cursor_shape=CURSOR_SHAPE_ARROW;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user