mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-22 07:23:14 +08:00
FIX:add protection for null pointer
jira: none Change-Id: I9a9231bab893f5d2afa008f65165269ae176c962
This commit is contained in:
parent
6472fbdc6a
commit
f27a713aaf
@ -496,6 +496,10 @@ void GLGizmoRotate3D::on_set_state()
|
||||
void GLGizmoRotate3D::data_changed(bool is_serializing) {
|
||||
const Selection &selection = m_parent.get_selection();
|
||||
const GLVolume * volume = selection.get_first_volume();
|
||||
if (volume == nullptr) {
|
||||
m_last_volume = nullptr;
|
||||
return;
|
||||
}
|
||||
if (m_last_volume != volume) {
|
||||
m_last_volume = volume;
|
||||
Geometry::Transformation tran;
|
||||
|
@ -1500,7 +1500,7 @@ void GLGizmoSVG::draw_filename()
|
||||
draw(get_icon(m_icons, IconType::bake, IconState::hovered));
|
||||
ImGui::SameLine();
|
||||
// TRN: An menu option to convert the SVG into an unmodifiable model part.
|
||||
if (ImGui::Selectable(_L("Bake to model").c_str())) {
|
||||
if (ImGui::Selectable(_u8L("Bake to model").c_str())) {
|
||||
m_volume->emboss_shape.reset();
|
||||
close();
|
||||
} else if (ImGui::IsItemHovered()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user