diff --git a/src/text/fmt/gtk/fv_UnixSelectionHandles.cpp b/src/text/fmt/gtk/fv_UnixSelectionHandles.cpp
index 935e8fa..3032aed 100644
a
|
b
|
FV_UnixSelectionHandles::FV_UnixSelectionHandles(FV_View *view, FV_Selection sel |
50 | 50 | : FV_SelectionHandles (view, selection) |
51 | 51 | { |
52 | 52 | XAP_Frame * pFrame = static_cast<XAP_Frame*>(m_pView->getParentData()); |
| 53 | |
| 54 | if (!pFrame) { |
| 55 | m_text_handle = NULL; |
| 56 | return; |
| 57 | } |
| 58 | |
53 | 59 | XAP_UnixFrameImpl * pFrameImpl =static_cast<XAP_UnixFrameImpl *>( pFrame->getFrameImpl()); |
54 | 60 | GtkWidget * pWidget = pFrameImpl->getViewWidget(); |
55 | 61 | |
… |
… |
FV_UnixSelectionHandles::FV_UnixSelectionHandles(FV_View *view, FV_Selection sel |
62 | 68 | |
63 | 69 | FV_UnixSelectionHandles::~FV_UnixSelectionHandles() |
64 | 70 | { |
65 | | g_object_unref (m_text_handle); |
| 71 | if (m_text_handle) |
| 72 | g_object_unref (m_text_handle); |
66 | 73 | } |
67 | 74 | |
68 | 75 | void FV_UnixSelectionHandles::hide() |
69 | 76 | { |
| 77 | if (!m_text_handle) |
| 78 | return; |
| 79 | |
70 | 80 | _fv_text_handle_set_mode (m_text_handle, FV_TEXT_HANDLE_MODE_NONE); |
71 | 81 | } |
72 | 82 | |
… |
… |
void FV_UnixSelectionHandles::setCursorCoords(UT_sint32 x, UT_sint32 y, UT_uint3 |
74 | 84 | { |
75 | 85 | GdkRectangle rect; |
76 | 86 | |
| 87 | if (!m_text_handle) |
| 88 | return; |
| 89 | |
77 | 90 | _fv_text_handle_set_mode(m_text_handle, FV_TEXT_HANDLE_MODE_CURSOR); |
78 | 91 | _fv_text_handle_set_visible (m_text_handle, FV_TEXT_HANDLE_POSITION_CURSOR, visible); |
79 | 92 | |
… |
… |
void FV_UnixSelectionHandles::setSelectionCoords(UT_sint32 start_x, UT_sint32 st |
94 | 107 | { |
95 | 108 | GdkRectangle rect; |
96 | 109 | |
| 110 | if (!m_text_handle) |
| 111 | return; |
| 112 | |
97 | 113 | _fv_text_handle_set_mode(m_text_handle, FV_TEXT_HANDLE_MODE_SELECTION); |
98 | 114 | |
99 | 115 | _fv_text_handle_set_visible (m_text_handle, FV_TEXT_HANDLE_POSITION_SELECTION_START, start_visible); |