Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-03-11 15:58:31 +0300
committerbubnikv <bubnikv@gmail.com>2020-03-11 15:58:31 +0300
commited760ae9320fc4f7119d49fc84830063b8d75ef6 (patch)
tree1836d86f3c322f7ea5a48e83642c6e695717acc2 /src/slic3r/GUI
parent2c9bd86a706fdc46d5ae295a1e03d0aa47cbfc69 (diff)
Fixed a fishy null pointer reference bug reported by ASAN time to time.
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r--src/slic3r/GUI/GUI_ObjectList.cpp48
1 files changed, 25 insertions, 23 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp
index e15e1ee97..349e407e0 100644
--- a/src/slic3r/GUI/GUI_ObjectList.cpp
+++ b/src/slic3r/GUI/GUI_ObjectList.cpp
@@ -850,30 +850,32 @@ void ObjectList::list_manipulation(const wxPoint& mouse_pos, bool evt_context_me
Select(item);
}
- const wxString title = col->GetTitle();
-
- if (title == " ")
- toggle_printable_state(item);
- else if (title == _("Editing"))
- show_context_menu(evt_context_menu);
- else if (title == _("Name"))
+ if (col != nullptr)
{
- if (wxOSX)
- show_context_menu(evt_context_menu); // return context menu under OSX (related to #2909)
-
- if (is_windows10())
- {
- int obj_idx, vol_idx;
- get_selected_item_indexes(obj_idx, vol_idx, item);
-
- if (get_mesh_errors_count(obj_idx, vol_idx) > 0 &&
- mouse_pos.x > 2 * wxGetApp().em_unit() && mouse_pos.x < 4 * wxGetApp().em_unit())
- fix_through_netfabb();
- }
- }
- // workaround for extruder editing under OSX
- else if (wxOSX && evt_context_menu && title == _("Extruder"))
- extruder_editing();
+ const wxString title = col->GetTitle();
+ if (title == " ")
+ toggle_printable_state(item);
+ else if (title == _("Editing"))
+ show_context_menu(evt_context_menu);
+ else if (title == _("Name"))
+ {
+ if (wxOSX)
+ show_context_menu(evt_context_menu); // return context menu under OSX (related to #2909)
+
+ if (is_windows10())
+ {
+ int obj_idx, vol_idx;
+ get_selected_item_indexes(obj_idx, vol_idx, item);
+
+ if (get_mesh_errors_count(obj_idx, vol_idx) > 0 &&
+ mouse_pos.x > 2 * wxGetApp().em_unit() && mouse_pos.x < 4 * wxGetApp().em_unit())
+ fix_through_netfabb();
+ }
+ }
+ // workaround for extruder editing under OSX
+ else if (wxOSX && evt_context_menu && title == _("Extruder"))
+ extruder_editing();
+ }
#ifndef __WXMSW__
GetMainWindow()->SetToolTip(""); // hide tooltip