mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/graph] Handle undefined function
Change-Id: Id26e0f81ba5c1446655f33b2c63f97ab5b684e41
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
namespace Graph {
|
||||
|
||||
Function::Function(const char * text, KDColor color) :
|
||||
m_text(""),
|
||||
m_name(text),
|
||||
m_color(color),
|
||||
m_expression(nullptr),
|
||||
@@ -22,7 +23,10 @@ void Function::setContent(const char * c) {
|
||||
if (m_layout != nullptr) {
|
||||
delete m_layout;
|
||||
}
|
||||
m_layout = expression()->createLayout();
|
||||
m_layout = nullptr;
|
||||
if (m_expression) {
|
||||
m_layout = expression()->createLayout();
|
||||
}
|
||||
}
|
||||
|
||||
void Function::setColor(KDColor color) {
|
||||
|
||||
Reference in New Issue
Block a user