summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext/pdo/pdo_dbh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 23c852553a..27c61d9498 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -1112,7 +1112,7 @@ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC)
int namelen;
char *lc_name;
- if (!dbh->methods->get_driver_methods) {
+ if (!dbh || !dbh->methods || !dbh->methods->get_driver_methods) {
return 0;
}
funcs = dbh->methods->get_driver_methods(dbh,