Skip to content

Commit

Permalink
Replace assert with StringIsEmpty for sticker inc and dec functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Dec 12, 2024
1 parent b1677bf commit c1e9710
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sticker/Database.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,11 @@ StickerDatabase::IncValue(const char *type, const char *uri,
assert(type != nullptr);
assert(uri != nullptr);
assert(name != nullptr);
assert(*name != 0);
assert(value != nullptr);

if (StringIsEmpty(name))
return;

BindAll(s, type, uri, name, value, value);

AtScopeExit(s) {
Expand All @@ -324,9 +326,11 @@ StickerDatabase::DecValue(const char *type, const char *uri,
assert(type != nullptr);
assert(uri != nullptr);
assert(name != nullptr);
assert(*name != 0);
assert(value != nullptr);

if (StringIsEmpty(name))
return;

BindAll(s, type, uri, name, value, value);

AtScopeExit(s) {
Expand Down

0 comments on commit c1e9710

Please sign in to comment.