mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
fix: out-of-memory error in call to sqlite3_open() on a non-existent SQLite database file
Closes #1367
This commit is contained in:
@@ -2833,6 +2833,10 @@ begin
|
||||
MainFile := IfThen(FileNames.Count>=1, FileNames[0], '');
|
||||
|
||||
if Value then begin
|
||||
// Fixes "out of memory" crash in sqlite3_open, see issue #1367
|
||||
if not FileExists(MainFile) then
|
||||
raise EDbError.Create(f_('File does not exist: %s', [MainFile]));
|
||||
|
||||
DoBeforeConnect;
|
||||
|
||||
ConnectResult := FLib.sqlite3_open(
|
||||
|
||||
Reference in New Issue
Block a user