From 3b498f687cfa3b6a5d2e81a185eca844f710eb99 Mon Sep 17 00:00:00 2001 From: Vojtech Kral <vojtech@kral.hk> Date: Fri, 6 Sep 2019 15:02:01 +0200 Subject: [PATCH 1/2] Fix a few error messages in avrdude --- src/avrdude/ser_posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/avrdude/ser_posix.c b/src/avrdude/ser_posix.c index e2afd1c09..9992f78e3 100644 --- a/src/avrdude/ser_posix.c +++ b/src/avrdude/ser_posix.c @@ -90,7 +90,7 @@ static speed_t serial_baud_lookup(long baud) * If a non-standard BAUD rate is used, issue * a warning (if we are verbose) and return the raw rate */ - avrdude_message(MSG_NOTICE, "%s: serial_baud_lookup(): Using non-standard baud rate: %ld", + avrdude_message(MSG_NOTICE, "%s: serial_baud_lookup(): Using non-standard baud rate: %ld\n", progname, baud); return baud; @@ -110,7 +110,7 @@ static int ser_setspeed(union filedescriptor *fd, long baud) */ rc = tcgetattr(fd->ifd, &termios); if (rc < 0) { - avrdude_message(MSG_INFO, "%s: ser_setspeed(): tcgetattr() failed", + avrdude_message(MSG_INFO, "%s: ser_setspeed(): tcgetattr() failed\n", progname); return -errno; } From 34821df6eb119b725c6e05596a4e73d3d6c69d37 Mon Sep 17 00:00:00 2001 From: Vojtech Kral <vojtech@kral.hk> Date: Fri, 6 Sep 2019 14:50:44 +0200 Subject: [PATCH 2/2] Fix bad pointer dereference in ObjectList::list_manipulation() Fix of #2875 --- src/slic3r/GUI/GUI_ObjectList.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 20760e2bc..7ba26f471 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -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; }