Check if defaultDB!=0 before dereferencing the pointer (line 6).