mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-14 00:45:57 +08:00
Fix bad pointer dereference in ObjectList::list_manipulation()
Fix of #2875
This commit is contained in:
parent
3b498f687c
commit
34821df6eb
@ -789,16 +789,11 @@ void ObjectList::OnContextMenu(wxDataViewEvent&)
|
||||
void ObjectList::list_manipulation()
|
||||
{
|
||||
wxDataViewItem item;
|
||||
wxDataViewColumn* col;
|
||||
wxDataViewColumn* col = nullptr;
|
||||
const wxPoint pt = get_mouse_position_in_control();
|
||||
HitTest(pt, item, col);
|
||||
#ifdef __WXOSX__ // temporary workaround for OSX
|
||||
// after Yosemite OS X version, HitTest return undefined item
|
||||
if (!item) item = GetSelection();
|
||||
#endif // __WXOSX__
|
||||
|
||||
if (!item) {
|
||||
printf("undefined item\n");
|
||||
if (!item || col == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user