aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools/Shared/GUI
diff options
context:
space:
mode:
authorMaarten Vanraes <maarten@ba.be>2016-07-23 09:24:29 +0200
committerMaarten Vanraes <maarten@ba.be>2016-07-23 09:24:29 +0200
commitffc1a5378677d9ebc2c7c6687c6321d0766598c5 (patch)
tree7f644d361ca9ff9c5602d8cd27d278747f8173e9 /lib/ManaTools/Shared/GUI
parentd12b34135dea96294ffb1084933d8429ce9ca464 (diff)
downloadmanatools-ffc1a5378677d9ebc2c7c6687c6321d0766598c5.tar
manatools-ffc1a5378677d9ebc2c7c6687c6321d0766598c5.tar.gz
manatools-ffc1a5378677d9ebc2c7c6687c6321d0766598c5.tar.bz2
manatools-ffc1a5378677d9ebc2c7c6687c6321d0766598c5.tar.xz
manatools-ffc1a5378677d9ebc2c7c6687c6321d0766598c5.zip
safeguard against empty names
Diffstat (limited to 'lib/ManaTools/Shared/GUI')
-rw-r--r--lib/ManaTools/Shared/GUI/EventRole.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ManaTools/Shared/GUI/EventRole.pm b/lib/ManaTools/Shared/GUI/EventRole.pm
index 14c91517..24db86e2 100644
--- a/lib/ManaTools/Shared/GUI/EventRole.pm
+++ b/lib/ManaTools/Shared/GUI/EventRole.pm
@@ -99,12 +99,12 @@ around 'name' => sub {
}
else {
$name = $self->$orig();
- $setting = 1 if (!defined $name);
+ $setting = 1 if (!defined $name) && $name ne '';
}
# return the current name
# if it's undef, we need to change this...
- if (!defined $name) {
+ if (!defined $name || $name eq '') {
# generate a unique Event name
$name = $self->uniqueName($self->eventHandler());
}