Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
medialibrary
Commits
3c019a2b
Commit
3c019a2b
authored
May 22, 2014
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SqliteTools: Fix potential crash with empty string columns
parent
421dd7c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/SqliteTools.h
src/SqliteTools.h
+5
-2
No files found.
src/SqliteTools.h
View file @
3c019a2b
...
...
@@ -31,9 +31,12 @@ struct Traits<std::string>
return
sqlite3_bind_text
(
stmt
,
pos
,
tmp
,
-
1
,
free
);
}
static
const
char
*
Load
(
sqlite3_stmt
*
stmt
,
int
pos
)
static
std
::
string
Load
(
sqlite3_stmt
*
stmt
,
int
pos
)
{
return
(
const
char
*
)
sqlite3_column_text
(
stmt
,
pos
);
auto
tmp
=
(
const
char
*
)
sqlite3_column_text
(
stmt
,
pos
);
if
(
tmp
!=
nullptr
)
return
std
::
string
(
tmp
);
return
std
::
string
();
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment