summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-19 09:25:24 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-19 09:26:00 -0400
commitf552c1cc5c91b60e6d0af3ccc442d439db1dd8b8 (patch)
treec157707e5a3ae487fd44e3f5f0196019dac23cfb /gtk2_ardour/editor_canvas.cc
parent592654936ed09ea40af310a75919a70ad764e8d4 (diff)
fix potential crash in Editor::set_canvas_cursor() if inadvertently passed a null cursor (semantics are different on OS X vs. X Window)
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r--gtk2_ardour/editor_canvas.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index bf7072edce..13057dc3b2 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -982,8 +982,8 @@ Editor::set_canvas_cursor (Gdk::Cursor* cursor, bool save)
Glib::RefPtr<Gdk::Window> win = _track_canvas->get_window();
- if (win) {
- _track_canvas->get_window()->set_cursor (*cursor);
+ if (win && cursor) {
+ win->set_cursor (*cursor);
}
}