mirror of
https://github.com/weechat/weechat.git
synced 2026-06-22 02:46:38 +02:00
Fixed crash when loading ruby script if file does not exist, with Ruby >= 1.9 only (bug #18064)
This commit is contained in:
@@ -1592,14 +1592,13 @@ weechat_python_load (t_weechat_plugin *plugin, char *filename)
|
||||
|
||||
if ((fp = fopen (filename, "r")) == NULL)
|
||||
{
|
||||
plugin->print_server (plugin,
|
||||
"Python error: unable to open file \"%s\"",
|
||||
plugin->print_server (plugin, "Python error: script \"%s\" not found",
|
||||
filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
python_current_script = NULL;
|
||||
|
||||
|
||||
/* PyEval_AcquireLock (); */
|
||||
python_current_interpreter = Py_NewInterpreter ();
|
||||
PySys_SetArgv(1, argv);
|
||||
|
||||
Reference in New Issue
Block a user