Skip to content

Commit 1d2a260

Browse files
Fix: One minor fix for a segmentation fault
1 parent 6b9280c commit 1d2a260

File tree

1 file changed

+3
-3
lines changed
  • source/module_hamilt_pw/hamilt_pwdft/module_exx_helper

1 file changed

+3
-3
lines changed

source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct Exx_Helper
1616

1717
public:
1818
Exx_Helper() = default;
19-
OperatorEXX *op_exx;
19+
OperatorEXX *op_exx = nullptr;
2020

2121
void set_firstiter() { first_iter = true; }
2222
void set_wg(const ModuleBase::matrix *wg_) { wg = wg_; }
@@ -35,8 +35,8 @@ struct Exx_Helper
3535

3636
private:
3737
bool first_iter;
38-
psi::Psi<T, Device> *psi;
39-
const ModuleBase::matrix *wg;
38+
psi::Psi<T, Device> *psi = nullptr;
39+
const ModuleBase::matrix *wg = nullptr;
4040

4141

4242
};

0 commit comments

Comments
 (0)