diff --git a/chalk/plugins/tools/defaulttools/kis_tool_brush.cc b/chalk/plugins/tools/defaulttools/kis_tool_brush.cc index 864135870..7c83a36b0 100644 --- a/chalk/plugins/tools/defaulttools/kis_tool_brush.cc +++ b/chalk/plugins/tools/defaulttools/kis_tool_brush.cc @@ -154,7 +154,7 @@ TQWidget* KisToolBrush::createOptionWidget(TQWidget* parent) m_chkDirect->setChecked(true); connect(m_chkDirect, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotSetPaintingMode(int))); - m_optionLayout = new TQGridLayout(widget, 3, 2, 0, 6); + m_optionLayout = new TQGridLayout(NULL, 3, 2, 0, 6); TQ_CHECK_PTR(m_optionLayout); super::addOptionWidgetLayout(m_optionLayout); diff --git a/chalk/ui/kis_view.cc b/chalk/ui/kis_view.cc index 795753573..569188d92 100644 --- a/chalk/ui/kis_view.cc +++ b/chalk/ui/kis_view.cc @@ -945,7 +945,7 @@ void KisView::updateTQPaintDeviceCanvas(const TQRect& imageRect) TQPainter gc; - if (gc.begin(&m_canvasPixmap)) { + if (!m_canvasPixmap.isNull() && gc.begin(&m_canvasPixmap)) { KisImageSP img = currentImg();