summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/globals.pl b/globals.pl
index 825c30af7..9c1b9a7ef 100644
--- a/globals.pl
+++ b/globals.pl
@@ -829,7 +829,7 @@ sub get_product_name {
sub get_component_id {
my ($prod_id, $comp) = @_;
- return undef unless ($prod_id =~ /^\d+$/);
+ return undef unless ($prod_id && ($prod_id =~ /^\d+$/));
PushGlobalSQLState();
SendSQL("SELECT id FROM components " .
"WHERE product_id = $prod_id AND name = " . SqlQuote($comp));