判断平衡二叉树用这种递归哪里有问题啊

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
class Solution {
public:
    int getdepth(TreeNode* root){
        if(root == nullptr) return 0;
        return 1+max(getdepth(root->left),getdepth(root->right));
    }
public:
    bool isBalanced(TreeNode* root) {
        if(root == nullptr) return true;
        bool left = isBalanced(root->left);
        bool right = isBalanced(root->left);
        if(abs(getdepth(root->left)-getdepth(root->right))>1)
            return false;
        else
            return left&&right;
    }
};

运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

好兄弟,第11行那里是 bool right = isBalanced(root->right);
这个是检查右子树的