mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-04 22:07:41 -07:00
FIX: 3mf files containing small thumbnails cause crash
Fix the issue that 3mf files containing small thumbnails cause the print page to crash. Due to m_cur_input_thumbnail_data has small size which caused array out of bounds and crash. jira: STUDIO-13731 Change-Id: Ie3c30287265f635e6afb2b1157c97c5b6863d54e (cherry picked from commit adffd16e1fbbcba0f1bc33ebd6112e57c88f30e7)
This commit is contained in:
parent
83feaeadec
commit
873fb30bc5
1 changed files with 1 additions and 1 deletions
|
|
@ -4031,7 +4031,7 @@ void SelectMachineDialog::record_edge_pixels_data()
|
|||
};
|
||||
ThumbnailData &data = m_cur_no_light_thumbnail_data;
|
||||
ThumbnailData &origin_data = m_cur_input_thumbnail_data;
|
||||
if (data.width > 0 && data.height > 0) {
|
||||
if (data.width > 0 && data.height > 0 && (data.width == origin_data.width && data.height == origin_data.height) ) {
|
||||
m_edge_pixels.resize(data.width * data.height);
|
||||
for (unsigned int r = 0; r < data.height; ++r) {
|
||||
unsigned int rr = (data.height - 1 - r) * data.width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue