summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/style-swatch.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2012-01-03 08:58:04 +0000
committerJon A. Cruz <jon@joncruz.org>2012-01-03 08:58:04 +0000
commit7a6239683da762264133d85d7c79aa06fcc7d725 (patch)
tree71deb81dfdf5699c171ee2d00f819ddd4700b1f5 /src/ui/widget/style-swatch.cpp
parentMore deprecated GtkTooltips (diff)
downloadinkscape-7a6239683da762264133d85d7c79aa06fcc7d725.tar.gz
inkscape-7a6239683da762264133d85d7c79aa06fcc7d725.zip
Fixed null-pointer ctor crashes.
(bzr r10828)
Diffstat (limited to 'src/ui/widget/style-swatch.cpp')
-rw-r--r--src/ui/widget/style-swatch.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp
index 1fdeb39df..759e2ff04 100644
--- a/src/ui/widget/style-swatch.cpp
+++ b/src/ui/widget/style-swatch.cpp
@@ -160,7 +160,10 @@ StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip)
_swatch.signal_button_press_event().connect(sigc::mem_fun(*this, &StyleSwatch::on_click));
- _swatch.set_tooltip_text(main_tip);
+ if (main_tip)
+ {
+ _swatch.set_tooltip_text(main_tip);
+ }
}
void StyleSwatch::setClickVerb(sp_verb_t verb_t) {
@@ -327,8 +330,9 @@ StyleSwatch::setStyle(SPStyle *query)
g_free (str);
}
} else {
- _stroke_width_place.set_tooltip_text(0);
- _stroke_width.set_markup ("");
+ _stroke_width_place.set_tooltip_text("");
+ _stroke_width.set_markup("");
+ _stroke_width.set_has_tooltip(false);
}
gdouble op = SP_SCALE24_TO_FLOAT(query->opacity.value);
@@ -348,8 +352,9 @@ StyleSwatch::setStyle(SPStyle *query)
g_free (str);
}
} else {
- _opacity_place.set_tooltip_text(0);
- _opacity_value.set_markup ("");
+ _opacity_place.set_tooltip_text("");
+ _opacity_value.set_markup("");
+ _opacity_value.set_has_tooltip(false);
}
show_all();