mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-22 11:12:49 +00:00
Add checks for null GtkWidget
Gtk complained about invalid widgets, because they were null.
This commit is contained in:
parent
eb8e0bc2b5
commit
dc7c7b7902
1 changed files with 4 additions and 2 deletions
|
@ -162,7 +162,8 @@ void Widget::RemoveChild(Widget* widget)
|
||||||
|
|
||||||
void Widget::SetVisible(bool visible)
|
void Widget::SetVisible(bool visible)
|
||||||
{
|
{
|
||||||
gtk_widget_set_visible(m_Widget, visible);
|
if (m_Widget)
|
||||||
|
gtk_widget_set_visible(m_Widget, visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::PropagateToParent(GdkEvent* event)
|
void Widget::PropagateToParent(GdkEvent* event)
|
||||||
|
@ -683,7 +684,8 @@ void Slider::SetOrientation(Orientation orientation)
|
||||||
|
|
||||||
void Slider::SetValue(double value)
|
void Slider::SetValue(double value)
|
||||||
{
|
{
|
||||||
gtk_range_set_value((GtkRange*)m_Widget, value);
|
if (m_Widget)
|
||||||
|
gtk_range_set_value((GtkRange*)m_Widget, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Slider::SetInverted(bool inverted)
|
void Slider::SetInverted(bool inverted)
|
||||||
|
|
Loading…
Reference in a new issue